Revision: 3465 http://geany.svn.sourceforge.net/geany/?rev=3465&view=rev Author: eht16 Date: 2009-01-14 16:08:00 +0000 (Wed, 14 Jan 2009)
Log Message: ----------- Add a format specification in global tags files and implement an additional fallback if the specification is missing. Adjust code and scripts which generate global tags files to add the new format specification. Update global tags files. Add documentation for the two supported global tags files formats.
Modified Paths: -------------- trunk/ChangeLog trunk/data/global.tags trunk/data/latex.tags trunk/data/pascal.tags trunk/data/php.tags trunk/data/python.tags trunk/doc/geany.html trunk/doc/geany.txt trunk/scripts/create_php_tags.php trunk/scripts/create_py_tags.py trunk/tagmanager/include/tm_tag.h trunk/tagmanager/tm_project.c trunk/tagmanager/tm_tag.c trunk/tagmanager/tm_workspace.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/ChangeLog 2009-01-14 16:08:00 UTC (rev 3465) @@ -1,7 +1,22 @@ +2009-01-14 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * data/global.tags, data/latex.tags, data/pascal.tags, data/php.tags, + data/python.tags, doc/geany.html, doc/geany.txt, + scripts/create_php_tags.php, scripts/create_py_tags.py, + tagmanager/include/tm_tag.h, tagmanager/tm_project.c, + tagmanager/tm_tag.c, tagmanager/tm_workspace.c: + Add a format specification in global tags files and implement + an additional fallback if the specification is missing. + Adjust code and scripts which generate global tags files to + add the new format specification. + Update global tags files. + Add documentation for the two supported global tags files formats. + + 2009-01-12 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* data/filetypes.vala: - Add default build commands (other sections are commented out and + Add default build commands (other sections are commented out and untested).
Modified: trunk/data/global.tags =================================================================== --- trunk/data/global.tags 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/data/global.tags 2009-01-14 16:08:00 UTC (rev 3465) @@ -1,3 +1,4 @@ +# format=tagmanager ABS\xCC65536\xD60 ABS\xCC131072\xCD(a)\xD60 AIO_PRIO_DELTA_MAX\xCC65536\xD60
Modified: trunk/data/latex.tags =================================================================== --- trunk/data/latex.tags 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/data/latex.tags 2009-01-14 16:08:00 UTC (rev 3465) @@ -1,3 +1,4 @@ +# format=pipe \above||| \abovecaptionskip||| \abovedisplayshortskip|||
Modified: trunk/data/pascal.tags =================================================================== --- trunk/data/pascal.tags 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/data/pascal.tags 2009-01-14 16:08:00 UTC (rev 3465) @@ -1,3 +1,4 @@ +# format=pipe arc||(X: SmallInt, Y: SmallInt, StAngle: Word, EndAngle: Word, Radius: Word)| assigncrt||(File: Text)| bar||(x1: SmallInt; y1: SmallInt; x2: SmallInt; y2: SmallInt)|
Modified: trunk/data/php.tags =================================================================== --- trunk/data/php.tags 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/data/php.tags 2009-01-14 16:08:00 UTC (rev 3465) @@ -1,4 +1,4 @@ -# Automatically generated file - do not edit (created on Tue, 10 Jun 2008 18:27:43 +0200) +# format=tagmanager - Automatically generated file - do not edit (created on Wed, 14 Jan 2009 16:59:30 +0100) abs\xCC128\xCD(int number)\xCFint acosh\xCC128\xCD(float number)\xCFfloat acos\xCC128\xCD(float number)\xCFfloat
Modified: trunk/data/python.tags =================================================================== --- trunk/data/python.tags 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/data/python.tags 2009-01-14 16:08:00 UTC (rev 3465) @@ -1,4 +1,4 @@ -# Automatically generated file - do not edit (created on Tue Jun 10 18:27:52 2008) +# format=tagmanager - Automatically generated file - do not edit (created on Wed Jan 14 16:59:26 2009) AbstractHTTPHandler\xCC1\xCD(BaseHandler) AbstractWriter\xCC1\xCD(NullWriter) AddPackagePath\xCC128\xCD(packagename, path) @@ -377,6 +377,7 @@ article\xCC128\xCD(self, id) asBase64\xCC128\xCD(self, maxlinelength=76) as_tuple\xCC128\xCD(self) +ascii_upper\xCC128\xCD(s) assert_line_data\xCC128\xCD(self, flag=1) assure_pickle_consistency\xCC128\xCD(verbose=False) async_chat\xCC1\xCD(asyncore.dispatcher)
Modified: trunk/doc/geany.html =================================================================== --- trunk/doc/geany.html 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/doc/geany.html 2009-01-14 16:08:00 UTC (rev 3465) @@ -6,7 +6,7 @@ <meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" /> <title>Geany</title> <meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" /> -<meta name="date" content="2009-01-04" /> +<meta name="date" content="2009-01-11" /> <style type="text/css">
/* @@ -139,7 +139,7 @@ <br />Nick Treleaven <br />Frank Lanitz</td></tr> <tr><th class="docinfo-name">Date:</th> -<td>2009-01-04</td></tr> +<td>2009-01-11</td></tr> <tr><th class="docinfo-name">Version:</th> <td>0.16</td></tr> </tbody> @@ -232,166 +232,167 @@ <li><a class="reference internal" href="#workspace-tags" id="id63">Workspace tags</a></li> <li><a class="reference internal" href="#global-tags" id="id64">Global tags</a><ul> <li><a class="reference internal" href="#default-global-tags-files" id="id65">Default global tags files</a></li> -<li><a class="reference internal" href="#generating-a-global-tags-file" id="id66">Generating a global tags file</a></li> +<li><a class="reference internal" href="#global-tags-file-format" id="id66">Global tags file format</a></li> +<li><a class="reference internal" href="#generating-a-global-tags-file" id="id67">Generating a global tags file</a></li> </ul> </li> -<li><a class="reference internal" href="#ignore-tags" id="id67">Ignore tags</a></li> +<li><a class="reference internal" href="#ignore-tags" id="id68">Ignore tags</a></li> </ul> </li> -<li><a class="reference internal" href="#preferences" id="id68">Preferences</a><ul> -<li><a class="reference internal" href="#general-tab-in-preferences-dialog" id="id69">General tab in preferences dialog</a><ul> -<li><a class="reference internal" href="#id1" id="id70">Startup</a></li> -<li><a class="reference internal" href="#shutdown" id="id71">Shutdown</a></li> -<li><a class="reference internal" href="#projects" id="id72">Projects</a></li> -<li><a class="reference internal" href="#miscellaneous" id="id73">Miscellaneous</a></li> +<li><a class="reference internal" href="#preferences" id="id69">Preferences</a><ul> +<li><a class="reference internal" href="#general-tab-in-preferences-dialog" id="id70">General tab in preferences dialog</a><ul> +<li><a class="reference internal" href="#id1" id="id71">Startup</a></li> +<li><a class="reference internal" href="#shutdown" id="id72">Shutdown</a></li> +<li><a class="reference internal" href="#projects" id="id73">Projects</a></li> +<li><a class="reference internal" href="#miscellaneous" id="id74">Miscellaneous</a></li> </ul> </li> -<li><a class="reference internal" href="#interface-tab-in-preferences-dialog" id="id74">Interface tab in preferences dialog</a><ul> -<li><a class="reference internal" href="#sidebar" id="id75">Sidebar</a></li> -<li><a class="reference internal" href="#fonts" id="id76">Fonts</a></li> -<li><a class="reference internal" href="#editor-tabs" id="id77">Editor tabs</a></li> -<li><a class="reference internal" href="#tab-positions" id="id78">Tab positions</a></li> -<li><a class="reference internal" href="#id2" id="id79">Miscellaneous</a></li> +<li><a class="reference internal" href="#interface-tab-in-preferences-dialog" id="id75">Interface tab in preferences dialog</a><ul> +<li><a class="reference internal" href="#sidebar" id="id76">Sidebar</a></li> +<li><a class="reference internal" href="#fonts" id="id77">Fonts</a></li> +<li><a class="reference internal" href="#editor-tabs" id="id78">Editor tabs</a></li> +<li><a class="reference internal" href="#tab-positions" id="id79">Tab positions</a></li> +<li><a class="reference internal" href="#id2" id="id80">Miscellaneous</a></li> </ul> </li> -<li><a class="reference internal" href="#toolbar-tab-in-preferences-dialog" id="id80">Toolbar tab in preferences dialog</a><ul> -<li><a class="reference internal" href="#toolbar" id="id81">Toolbar</a></li> -<li><a class="reference internal" href="#appearance" id="id82">Appearance</a></li> +<li><a class="reference internal" href="#toolbar-tab-in-preferences-dialog" id="id81">Toolbar tab in preferences dialog</a><ul> +<li><a class="reference internal" href="#toolbar" id="id82">Toolbar</a></li> +<li><a class="reference internal" href="#appearance" id="id83">Appearance</a></li> </ul> </li> -<li><a class="reference internal" href="#editor-features-tab-in-preferences-dialog" id="id83">Editor Features tab in preferences dialog</a><ul> -<li><a class="reference internal" href="#indentation-group" id="id84">Indentation group</a></li> -<li><a class="reference internal" href="#features" id="id85">Features</a></li> +<li><a class="reference internal" href="#editor-features-tab-in-preferences-dialog" id="id84">Editor Features tab in preferences dialog</a><ul> +<li><a class="reference internal" href="#indentation-group" id="id85">Indentation group</a></li> +<li><a class="reference internal" href="#features" id="id86">Features</a></li> </ul> </li> -<li><a class="reference internal" href="#editor-completions-tab-in-preferences-dialog" id="id86">Editor Completions tab in preferences dialog</a></li> -<li><a class="reference internal" href="#editor-display-tab-in-preferences-dialog" id="id87">Editor Display tab in preferences dialog</a><ul> -<li><a class="reference internal" href="#display" id="id88">Display</a></li> -<li><a class="reference internal" href="#long-line-marker" id="id89">Long line marker</a></li> +<li><a class="reference internal" href="#editor-completions-tab-in-preferences-dialog" id="id87">Editor Completions tab in preferences dialog</a></li> +<li><a class="reference internal" href="#editor-display-tab-in-preferences-dialog" id="id88">Editor Display tab in preferences dialog</a><ul> +<li><a class="reference internal" href="#display" id="id89">Display</a></li> +<li><a class="reference internal" href="#long-line-marker" id="id90">Long line marker</a></li> </ul> </li> -<li><a class="reference internal" href="#files-tab-in-preferences-dialog" id="id90">Files tab in preferences dialog</a><ul> -<li><a class="reference internal" href="#new-files" id="id91">New files</a></li> -<li><a class="reference internal" href="#saving-files" id="id92">Saving files</a></li> -<li><a class="reference internal" href="#id3" id="id93">Miscellaneous</a></li> +<li><a class="reference internal" href="#files-tab-in-preferences-dialog" id="id91">Files tab in preferences dialog</a><ul> +<li><a class="reference internal" href="#new-files" id="id92">New files</a></li> +<li><a class="reference internal" href="#saving-files" id="id93">Saving files</a></li> +<li><a class="reference internal" href="#id3" id="id94">Miscellaneous</a></li> </ul> </li> -<li><a class="reference internal" href="#search-tab-in-preferences-dialog" id="id94">Search tab in preferences dialog</a></li> -<li><a class="reference internal" href="#tools-tab-in-preferences-dialog" id="id95">Tools tab in preferences dialog</a><ul> -<li><a class="reference internal" href="#tool-paths" id="id96">Tool paths</a></li> -<li><a class="reference internal" href="#commands" id="id97">Commands</a></li> +<li><a class="reference internal" href="#search-tab-in-preferences-dialog" id="id95">Search tab in preferences dialog</a></li> +<li><a class="reference internal" href="#tools-tab-in-preferences-dialog" id="id96">Tools tab in preferences dialog</a><ul> +<li><a class="reference internal" href="#tool-paths" id="id97">Tool paths</a></li> +<li><a class="reference internal" href="#commands" id="id98">Commands</a></li> </ul> </li> -<li><a class="reference internal" href="#template-tab-in-preferences-dialog" id="id98">Template tab in preferences dialog</a><ul> -<li><a class="reference internal" href="#template-data" id="id99">Template data</a></li> +<li><a class="reference internal" href="#template-tab-in-preferences-dialog" id="id99">Template tab in preferences dialog</a><ul> +<li><a class="reference internal" href="#template-data" id="id100">Template data</a></li> </ul> </li> -<li><a class="reference internal" href="#keybinding-tab-in-preferences-dialog" id="id100">Keybinding tab in preferences dialog</a></li> -<li><a class="reference internal" href="#printing-tab-in-preferences-dialog" id="id101">Printing tab in preferences dialog</a></li> -<li><a class="reference internal" href="#terminal-vte-tab-in-preferences-dialog" id="id102">Terminal (VTE) tab in preferences dialog</a><ul> -<li><a class="reference internal" href="#terminal-widget" id="id103">Terminal widget</a></li> +<li><a class="reference internal" href="#keybinding-tab-in-preferences-dialog" id="id101">Keybinding tab in preferences dialog</a></li> +<li><a class="reference internal" href="#printing-tab-in-preferences-dialog" id="id102">Printing tab in preferences dialog</a></li> +<li><a class="reference internal" href="#terminal-vte-tab-in-preferences-dialog" id="id103">Terminal (VTE) tab in preferences dialog</a><ul> +<li><a class="reference internal" href="#terminal-widget" id="id104">Terminal widget</a></li> </ul> </li> </ul> </li> -<li><a class="reference internal" href="#project-management" id="id104">Project Management</a><ul> -<li><a class="reference internal" href="#new-project" id="id105">New Project</a></li> -<li><a class="reference internal" href="#project-properties" id="id106">Project Properties</a><ul> -<li><a class="reference internal" href="#make-in-base-path" id="id107">Make in base path</a></li> -<li><a class="reference internal" href="#run-command" id="id108">Run command</a></li> +<li><a class="reference internal" href="#project-management" id="id105">Project Management</a><ul> +<li><a class="reference internal" href="#new-project" id="id106">New Project</a></li> +<li><a class="reference internal" href="#project-properties" id="id107">Project Properties</a><ul> +<li><a class="reference internal" href="#make-in-base-path" id="id108">Make in base path</a></li> +<li><a class="reference internal" href="#run-command" id="id109">Run command</a></li> </ul> </li> -<li><a class="reference internal" href="#open-project" id="id109">Open Project</a></li> -<li><a class="reference internal" href="#close-project" id="id110">Close Project</a></li> +<li><a class="reference internal" href="#open-project" id="id110">Open Project</a></li> +<li><a class="reference internal" href="#close-project" id="id111">Close Project</a></li> </ul> </li> -<li><a class="reference internal" href="#build-system" id="id111">Build system</a><ul> -<li><a class="reference internal" href="#compile" id="id112">Compile</a></li> -<li><a class="reference internal" href="#build" id="id113">Build</a></li> -<li><a class="reference internal" href="#make-all" id="id114">Make all</a></li> -<li><a class="reference internal" href="#make-custom-target" id="id115">Make custom target</a></li> -<li><a class="reference internal" href="#make-object" id="id116">Make object</a></li> -<li><a class="reference internal" href="#execute" id="id117">Execute</a></li> -<li><a class="reference internal" href="#stopping-running-processes" id="id118">Stopping running processes</a><ul> -<li><a class="reference internal" href="#terminal-emulators" id="id119">Terminal emulators</a></li> +<li><a class="reference internal" href="#build-system" id="id112">Build system</a><ul> +<li><a class="reference internal" href="#compile" id="id113">Compile</a></li> +<li><a class="reference internal" href="#build" id="id114">Build</a></li> +<li><a class="reference internal" href="#make-all" id="id115">Make all</a></li> +<li><a class="reference internal" href="#make-custom-target" id="id116">Make custom target</a></li> +<li><a class="reference internal" href="#make-object" id="id117">Make object</a></li> +<li><a class="reference internal" href="#execute" id="id118">Execute</a></li> +<li><a class="reference internal" href="#stopping-running-processes" id="id119">Stopping running processes</a><ul> +<li><a class="reference internal" href="#terminal-emulators" id="id120">Terminal emulators</a></li> </ul> </li> -<li><a class="reference internal" href="#set-includes-and-arguments" id="id120">Set Includes and Arguments</a><ul> -<li><a class="reference internal" href="#one-step-compilation" id="id121">One step compilation</a></li> +<li><a class="reference internal" href="#set-includes-and-arguments" id="id121">Set Includes and Arguments</a><ul> +<li><a class="reference internal" href="#one-step-compilation" id="id122">One step compilation</a></li> </ul> </li> -<li><a class="reference internal" href="#indicators" id="id122">Indicators</a></li> +<li><a class="reference internal" href="#indicators" id="id123">Indicators</a></li> </ul> </li> -<li><a class="reference internal" href="#printing-support" id="id123">Printing support</a></li> -<li><a class="reference internal" href="#plugins" id="id124">Plugins</a></li> -<li><a class="reference internal" href="#keybindings" id="id125">Keybindings</a><ul> -<li><a class="reference internal" href="#switching-documents" id="id126">Switching documents</a></li> -<li><a class="reference internal" href="#configurable-keybindings" id="id127">Configurable keybindings</a></li> +<li><a class="reference internal" href="#printing-support" id="id124">Printing support</a></li> +<li><a class="reference internal" href="#plugins" id="id125">Plugins</a></li> +<li><a class="reference internal" href="#keybindings" id="id126">Keybindings</a><ul> +<li><a class="reference internal" href="#switching-documents" id="id127">Switching documents</a></li> +<li><a class="reference internal" href="#configurable-keybindings" id="id128">Configurable keybindings</a></li> </ul> </li> </ul> </li> -<li><a class="reference internal" href="#configuration-files" id="id128">Configuration files</a><ul> -<li><a class="reference internal" href="#global-configuration-file" id="id129">Global configuration file</a></li> -<li><a class="reference internal" href="#filetype-definition-files" id="id130">Filetype definition files</a><ul> -<li><a class="reference internal" href="#format" id="id131">Format</a><ul> -<li><a class="reference internal" href="#styling-section" id="id132">[styling] Section</a></li> -<li><a class="reference internal" href="#keywords-section" id="id133">[keywords] Section</a></li> -<li><a class="reference internal" href="#settings-section" id="id134">[settings] Section</a></li> -<li><a class="reference internal" href="#build-settings-section" id="id135">[build_settings] Section</a></li> +<li><a class="reference internal" href="#configuration-files" id="id129">Configuration files</a><ul> +<li><a class="reference internal" href="#global-configuration-file" id="id130">Global configuration file</a></li> +<li><a class="reference internal" href="#filetype-definition-files" id="id131">Filetype definition files</a><ul> +<li><a class="reference internal" href="#format" id="id132">Format</a><ul> +<li><a class="reference internal" href="#styling-section" id="id133">[styling] Section</a></li> +<li><a class="reference internal" href="#keywords-section" id="id134">[keywords] Section</a></li> +<li><a class="reference internal" href="#settings-section" id="id135">[settings] Section</a></li> +<li><a class="reference internal" href="#build-settings-section" id="id136">[build_settings] Section</a></li> </ul> </li> -<li><a class="reference internal" href="#special-file-filetypes-common" id="id136">Special file filetypes.common</a></li> +<li><a class="reference internal" href="#special-file-filetypes-common" id="id137">Special file filetypes.common</a></li> </ul> </li> -<li><a class="reference internal" href="#filetype-extensions" id="id137">Filetype extensions</a></li> -<li><a class="reference internal" href="#templates" id="id138">Templates</a><ul> -<li><a class="reference internal" href="#template-meta-data" id="id139">Template meta data</a></li> -<li><a class="reference internal" href="#file-templates" id="id140">File templates</a><ul> -<li><a class="reference internal" href="#custom-file-templates" id="id141">Custom file templates</a></li> -<li><a class="reference internal" href="#filetype-templates" id="id142">Filetype templates</a></li> +<li><a class="reference internal" href="#filetype-extensions" id="id138">Filetype extensions</a></li> +<li><a class="reference internal" href="#templates" id="id139">Templates</a><ul> +<li><a class="reference internal" href="#template-meta-data" id="id140">Template meta data</a></li> +<li><a class="reference internal" href="#file-templates" id="id141">File templates</a><ul> +<li><a class="reference internal" href="#custom-file-templates" id="id142">Custom file templates</a></li> +<li><a class="reference internal" href="#filetype-templates" id="id143">Filetype templates</a></li> </ul> </li> -<li><a class="reference internal" href="#customizing-templates" id="id143">Customizing templates</a><ul> -<li><a class="reference internal" href="#template-wildcards" id="id144">Template wildcards</a></li> +<li><a class="reference internal" href="#customizing-templates" id="id144">Customizing templates</a><ul> +<li><a class="reference internal" href="#template-wildcards" id="id145">Template wildcards</a></li> </ul> </li> </ul> </li> -<li><a class="reference internal" href="#customizing-the-toolbar" id="id145">Customizing the toolbar</a><ul> -<li><a class="reference internal" href="#available-toolbar-elements" id="id146">Available toolbar elements</a></li> +<li><a class="reference internal" href="#customizing-the-toolbar" id="id146">Customizing the toolbar</a><ul> +<li><a class="reference internal" href="#available-toolbar-elements" id="id147">Available toolbar elements</a></li> </ul> </li> </ul> </li> -<li><a class="reference internal" href="#plugin-documentation" id="id147">Plugin documentation</a><ul> -<li><a class="reference internal" href="#instant-save" id="id148">Instant Save</a></li> -<li><a class="reference internal" href="#backup-copy" id="id149">Backup Copy</a></li> +<li><a class="reference internal" href="#plugin-documentation" id="id148">Plugin documentation</a><ul> +<li><a class="reference internal" href="#instant-save" id="id149">Instant Save</a></li> +<li><a class="reference internal" href="#backup-copy" id="id150">Backup Copy</a></li> </ul> </li> -<li><a class="reference internal" href="#contributing-to-this-document" id="id150">Contributing to this document</a></li> -<li><a class="reference internal" href="#scintilla-keyboard-commands" id="id151">Scintilla keyboard commands</a><ul> -<li><a class="reference internal" href="#keyboard-commands" id="id152">Keyboard commands</a></li> +<li><a class="reference internal" href="#contributing-to-this-document" id="id151">Contributing to this document</a></li> +<li><a class="reference internal" href="#scintilla-keyboard-commands" id="id152">Scintilla keyboard commands</a><ul> +<li><a class="reference internal" href="#keyboard-commands" id="id153">Keyboard commands</a></li> </ul> </li> -<li><a class="reference internal" href="#tips-and-tricks" id="id153">Tips and tricks</a><ul> -<li><a class="reference internal" href="#document-notebook" id="id154">Document notebook</a></li> -<li><a class="reference internal" href="#editor" id="id155">Editor</a></li> -<li><a class="reference internal" href="#interface" id="id156">Interface</a></li> -<li><a class="reference internal" href="#gtk-related" id="id157">GTK-related</a></li> +<li><a class="reference internal" href="#tips-and-tricks" id="id154">Tips and tricks</a><ul> +<li><a class="reference internal" href="#document-notebook" id="id155">Document notebook</a></li> +<li><a class="reference internal" href="#editor" id="id156">Editor</a></li> +<li><a class="reference internal" href="#interface" id="id157">Interface</a></li> +<li><a class="reference internal" href="#gtk-related" id="id158">GTK-related</a></li> </ul> </li> -<li><a class="reference internal" href="#hidden-preferences" id="id158">Hidden preferences</a></li> -<li><a class="reference internal" href="#compile-time-options" id="id159">Compile-time options</a><ul> -<li><a class="reference internal" href="#src-geany-h" id="id160">src/geany.h</a></li> -<li><a class="reference internal" href="#project-h" id="id161">project.h</a></li> -<li><a class="reference internal" href="#editor-h" id="id162">editor.h</a></li> -<li><a class="reference internal" href="#keyfile-c" id="id163">keyfile.c</a></li> +<li><a class="reference internal" href="#hidden-preferences" id="id159">Hidden preferences</a></li> +<li><a class="reference internal" href="#compile-time-options" id="id160">Compile-time options</a><ul> +<li><a class="reference internal" href="#src-geany-h" id="id161">src/geany.h</a></li> +<li><a class="reference internal" href="#project-h" id="id162">project.h</a></li> +<li><a class="reference internal" href="#editor-h" id="id163">editor.h</a></li> +<li><a class="reference internal" href="#keyfile-c" id="id164">keyfile.c</a></li> </ul> </li> -<li><a class="reference internal" href="#gnu-general-public-license" id="id164">GNU General Public License</a></li> -<li><a class="reference internal" href="#license-for-scintilla-and-scite" id="id165">License for Scintilla and SciTE</a></li> +<li><a class="reference internal" href="#gnu-general-public-license" id="id165">GNU General Public License</a></li> +<li><a class="reference internal" href="#license-for-scintilla-and-scite" id="id166">License for Scintilla and SciTE</a></li> </ul> </div> <div class="section" id="introduction"> @@ -1495,19 +1496,53 @@ <li>Python</li> </ul> </div> +<div class="section" id="global-tags-file-format"> +<h4><a class="toc-backref" href="#id66">Global tags file format</a></h4> +<p>Global tags files can have two different formats:</p> +<ul class="simple"> +<li>Tagmanager format</li> +<li>Pipe-separated format</li> +</ul> +<p>The first line of global tags files should be a comment, introduced +by <tt class="docutils literal"><span class="pre">#</span></tt> followed by a space and a string like <tt class="docutils literal"><span class="pre">format=pipe</span></tt> +respectively <tt class="docutils literal"><span class="pre">format=tagmanager</span></tt> (case-sensitive). +This helps Geany to read the file properly. If this line +is missing, Geany tries to auto-detect the used format but this +might fail.</p> +<p>The Tagmanager format is a bit more complex and is used for files +created by the <tt class="docutils literal"><span class="pre">geany</span> <span class="pre">-g</span></tt> command. There is one tag per line. +Different tag attributes like the return value or the argument list +are separated with different characters indicating the type of the +following argument.</p> +<p>The Pipe-separated format is easier to read and write. +There is one tag per line and different tag attributes are separated +by the pipe character (<tt class="docutils literal"><span class="pre">|</span></tt>). A line looks like:</p> +<pre class="literal-block"> +basename|string|(string path [, string suffix])| +</pre> +<div class="line-block"> +<div class="line">The first field is the tag name (usually a function name).</div> +<div class="line">The second field is the type of the return value.</div> +<div class="line">The third field is the argument list for this tag.</div> +<div class="line">The fourth field is the description for this tag but +currently unused and should be left empty.</div> +</div> +<p>Except for the first field (tag name), all other field can be left +empty but the pipe separator must appear for them.</p> +<p>You can easily write your own global tag files using this format. +Just save them in your tags directory, as described earlier in the +section <a class="reference internal" href="#global-tags">Global tags</a>.</p> +</div> <div class="section" id="generating-a-global-tags-file"> -<h4><a class="toc-backref" href="#id66">Generating a global tags file</a></h4> -<p><em>Filetypes support:</em></p> -<p>Currently this is not yet supported for Pascal, PHP and LaTeX -filetypes.</p> +<h4><a class="toc-backref" href="#id67">Generating a global tags file</a></h4> <p>You can generate your own global tags files by parsing a list of source files. The command is:</p> <pre class="literal-block"> geany -g [-P] <Tag File> <File list> </pre> <ul class="simple"> -<li>Tag File should be in the format described earlier -- see the -section called <a class="reference internal" href="#global-tags">Global tags</a>.</li> +<li>Tag File filename should be in the format described earlier -- +see the section called <a class="reference internal" href="#global-tags">Global tags</a>.</li> <li>File list is a list of filenames, each with a full path (unless you are generating C/C++ tags and have set the CFLAGS environment variable appropriately).</li> @@ -1544,7 +1579,7 @@ </div> </div> <div class="section" id="ignore-tags"> -<h3><a class="toc-backref" href="#id67">Ignore tags</a></h3> +<h3><a class="toc-backref" href="#id68">Ignore tags</a></h3> <p>You can also ignore certain tags if they would lead to wrong parsing of the code. Simply create a file called "ignore.tags" in your Geany configuration directory (usually <tt class="docutils literal"><span class="pre">~/.config/geany/</span></tt>). Then list all tags @@ -1568,7 +1603,7 @@ </div> </div> <div class="section" id="preferences"> -<h2><a class="toc-backref" href="#id68">Preferences</a></h2> +<h2><a class="toc-backref" href="#id69">Preferences</a></h2> <p>You may adjust Geany's settings using the Edit --> Preferences dialog. Any changes you make there can be applied by hitting either the Apply or the OK button. These settings will persist between Geany @@ -1586,10 +1621,10 @@ comes after the screenshot of that tab.</p> </div> <div class="section" id="general-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id69">General tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id70">General tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_gen.png" src="./images/pref_dialog_gen.png" /> <div class="section" id="id1"> -<h4><a class="toc-backref" href="#id70">Startup</a></h4> +<h4><a class="toc-backref" href="#id71">Startup</a></h4> <dl class="docutils"> <dt>Load files from the last session</dt> <dd>On startup, load the same files you had open the last time you @@ -1601,7 +1636,7 @@ </dl> </div> <div class="section" id="shutdown"> -<h4><a class="toc-backref" href="#id71">Shutdown</a></h4> +<h4><a class="toc-backref" href="#id72">Shutdown</a></h4> <dl class="docutils"> <dt>Save window position and geometry</dt> <dd>Save the current position and size of the main window so next time @@ -1611,7 +1646,7 @@ </dl> </div> <div class="section" id="projects"> -<h4><a class="toc-backref" href="#id72">Projects</a></h4> +<h4><a class="toc-backref" href="#id73">Projects</a></h4> <dl class="docutils"> <dt>Use project-based session files</dt> <dd>Save your current session when closing projects. You will be able to @@ -1627,7 +1662,7 @@ </dl> </div> <div class="section" id="miscellaneous"> -<h4><a class="toc-backref" href="#id73">Miscellaneous</a></h4> +<h4><a class="toc-backref" href="#id74">Miscellaneous</a></h4> <dl class="docutils"> <dt>Beep on errors when compilation has finished</dt> <dd>Have the computer make a beeping sound when compilation of your program @@ -1645,10 +1680,10 @@ </div> </div> <div class="section" id="interface-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id74">Interface tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id75">Interface tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_interface.png" src="./images/pref_dialog_interface.png" /> <div class="section" id="sidebar"> -<h4><a class="toc-backref" href="#id75">Sidebar</a></h4> +<h4><a class="toc-backref" href="#id76">Sidebar</a></h4> <dl class="docutils"> <dt>Show symbol list</dt> <dd>Show the list of functions, variables, and other information in the @@ -1663,7 +1698,7 @@ </dl> </div> <div class="section" id="fonts"> -<h4><a class="toc-backref" href="#id76">Fonts</a></h4> +<h4><a class="toc-backref" href="#id77">Fonts</a></h4> <dl class="docutils"> <dt>Editor</dt> <dd>Change the font used to display documents.</dd> @@ -1674,7 +1709,7 @@ </dl> </div> <div class="section" id="editor-tabs"> -<h4><a class="toc-backref" href="#id77">Editor tabs</a></h4> +<h4><a class="toc-backref" href="#id78">Editor tabs</a></h4> <dl class="docutils"> <dt>Show editor tabs</dt> <dd>Show a notebook tab for all documents so you can switch between them @@ -1691,7 +1726,7 @@ </dl> </div> <div class="section" id="tab-positions"> -<h4><a class="toc-backref" href="#id78">Tab positions</a></h4> +<h4><a class="toc-backref" href="#id79">Tab positions</a></h4> <dl class="docutils"> <dt>Editor</dt> <dd>Set the positioning of the editor's notebook tabs to the right, @@ -1705,7 +1740,7 @@ </dl> </div> <div class="section" id="id2"> -<h4><a class="toc-backref" href="#id79">Miscellaneous</a></h4> +<h4><a class="toc-backref" href="#id80">Miscellaneous</a></h4> <dl class="docutils"> <dt>Show status bar</dt> <dd>Show the status bar at the bottom of the main window. It gives information about @@ -1715,18 +1750,18 @@ </div> </div> <div class="section" id="toolbar-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id80">Toolbar tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id81">Toolbar tab in preferences dialog</a></h3> <p>Affects the main toolbar underneath the menu bar.</p> <img alt="./images/pref_dialog_toolbar.png" src="./images/pref_dialog_toolbar.png" /> <div class="section" id="toolbar"> -<h4><a class="toc-backref" href="#id81">Toolbar</a></h4> +<h4><a class="toc-backref" href="#id82">Toolbar</a></h4> <dl class="docutils"> <dt>Show Toolbar</dt> <dd>Whether to show the toolbar.</dd> </dl> </div> <div class="section" id="appearance"> -<h4><a class="toc-backref" href="#id82">Appearance</a></h4> +<h4><a class="toc-backref" href="#id83">Appearance</a></h4> <dl class="docutils"> <dt>Icon Style</dt> <dd>Select the toolbar icon style to use - either icons and text, just @@ -1737,10 +1772,10 @@ </div> </div> <div class="section" id="editor-features-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id83">Editor Features tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id84">Editor Features tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_edit_features.png" src="./images/pref_dialog_edit_features.png" /> <div class="section" id="indentation-group"> -<h4><a class="toc-backref" href="#id84">Indentation group</a></h4> +<h4><a class="toc-backref" href="#id85">Indentation group</a></h4> <p>See <a class="reference internal" href="#indentation">Indentation</a> for more information.</p> <dl class="docutils"> <dt>Type</dt> @@ -1792,7 +1827,7 @@ </dl> </div> <div class="section" id="features"> -<h4><a class="toc-backref" href="#id85">Features</a></h4> +<h4><a class="toc-backref" href="#id86">Features</a></h4> <dl class="docutils"> <dt>Line wrapping</dt> <dd>Show long lines wrapped around to new display lines.</dd> @@ -1824,7 +1859,7 @@ </div> </div> <div class="section" id="editor-completions-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id86">Editor Completions tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id87">Editor Completions tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_edit_completions.png" src="./images/pref_dialog_edit_completions.png" /> <dl class="docutils"> <dt>Snippet Completion</dt> @@ -1863,11 +1898,11 @@ </dl> </div> <div class="section" id="editor-display-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id87">Editor Display tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id88">Editor Display tab in preferences dialog</a></h3> <p>This is for visual elements displayed in the editor window.</p> <img alt="./images/pref_dialog_edit_display.png" src="./images/pref_dialog_edit_display.png" /> <div class="section" id="display"> -<h4><a class="toc-backref" href="#id88">Display</a></h4> +<h4><a class="toc-backref" href="#id89">Display</a></h4> <dl class="docutils"> <dt>Show indendation guides</dt> <dd>Show vertical lines to help show how much leading indentation there @@ -1884,7 +1919,7 @@ </dl> </div> <div class="section" id="long-line-marker"> -<h4><a class="toc-backref" href="#id89">Long line marker</a></h4> +<h4><a class="toc-backref" href="#id90">Long line marker</a></h4> <p>The long line marker helps to indicate overly-long lines, or as a hint to the user for when to break the line.</p> <dl class="docutils"> @@ -1910,10 +1945,10 @@ </div> </div> <div class="section" id="files-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id90">Files tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id91">Files tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_files.png" src="./images/pref_dialog_files.png" /> <div class="section" id="new-files"> -<h4><a class="toc-backref" href="#id91">New files</a></h4> +<h4><a class="toc-backref" href="#id92">New files</a></h4> <dl class="docutils"> <dt>Open new documents from the command-line</dt> <dd>Whether to create new documents when passing filenames that don't @@ -1933,7 +1968,7 @@ </dl> </div> <div class="section" id="saving-files"> -<h4><a class="toc-backref" href="#id92">Saving files</a></h4> +<h4><a class="toc-backref" href="#id93">Saving files</a></h4> <p>Perform special formatting operations when a document is saved. These can each be undone with the Undo command as usual.</p> <dl class="docutils"> @@ -1952,7 +1987,7 @@ </dl> </div> <div class="section" id="id3"> -<h4><a class="toc-backref" href="#id93">Miscellaneous</a></h4> +<h4><a class="toc-backref" href="#id94">Miscellaneous</a></h4> <dl class="docutils"> <dt>Recent files list length</dt> <dd>The number of files to remember in the recently used files list.</dd> @@ -1963,7 +1998,7 @@ </div> </div> <div class="section" id="search-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id94">Search tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id95">Search tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_search.png" src="./images/pref_dialog_search.png" /> <dl class="docutils"> <dt>Always wrap search and hide the Find dialog</dt> @@ -1980,10 +2015,10 @@ </dl> </div> <div class="section" id="tools-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id95">Tools tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id96">Tools tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_tools.png" src="./images/pref_dialog_tools.png" /> <div class="section" id="tool-paths"> -<h4><a class="toc-backref" href="#id96">Tool paths</a></h4> +<h4><a class="toc-backref" href="#id97">Tool paths</a></h4> <dl class="docutils"> <dt>Make</dt> <dd>The location of the make executable.</dd> @@ -2003,7 +2038,7 @@ </div> </div> <div class="section" id="commands"> -<h4><a class="toc-backref" href="#id97">Commands</a></h4> +<h4><a class="toc-backref" href="#id98">Commands</a></h4> <dl class="docutils"> <dt>Context action</dt> <dd>Set this to a command to execute on the current word. @@ -2013,7 +2048,7 @@ </div> </div> <div class="section" id="template-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id98">Template tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id99">Template tab in preferences dialog</a></h3> <p>This data is used as meta data for various template text to insert into a document, such as the file header. You only need to set fields that you want to use in your template files.</p> @@ -2023,7 +2058,7 @@ </div> <img alt="./images/pref_dialog_templ.png" src="./images/pref_dialog_templ.png" /> <div class="section" id="template-data"> -<h4><a class="toc-backref" href="#id99">Template data</a></h4> +<h4><a class="toc-backref" href="#id100">Template data</a></h4> <dl class="docutils"> <dt>Developer</dt> <dd>The name of the developer who will be creating files.</dd> @@ -2056,7 +2091,7 @@ </div> </div> <div class="section" id="keybinding-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id100">Keybinding tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id101">Keybinding tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_keys.png" src="./images/pref_dialog_keys.png" /> <p>There are some handy commands in here that are not, by default, bound to a key combination, and may not be available as a menu item.</p> @@ -2066,7 +2101,7 @@ </div> </div> <div class="section" id="printing-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id101">Printing tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id102">Printing tab in preferences dialog</a></h3> <img alt="./images/pref_dialog_printing.png" src="./images/pref_dialog_printing.png" /> <dl class="docutils"> <dt>Use external command for printing</dt> @@ -2088,11 +2123,11 @@ </dl> </div> <div class="section" id="terminal-vte-tab-in-preferences-dialog"> -<h3><a class="toc-backref" href="#id102">Terminal (VTE) tab in preferences dialog</a></h3> +<h3><a class="toc-backref" href="#id103">Terminal (VTE) tab in preferences dialog</a></h3> <p>See also: <a class="reference internal" href="#virtual-terminal-emulator-widget-vte">Virtual terminal emulator widget (VTE)</a>.</p> <img alt="./images/pref_dialog_vte.png" src="./images/pref_dialog_vte.png" /> <div class="section" id="terminal-widget"> -<h4><a class="toc-backref" href="#id103">Terminal widget</a></h4> +<h4><a class="toc-backref" href="#id104">Terminal widget</a></h4> <dl class="docutils"> <dt>Terminal font</dt> <dd>Select the font that will be used in the terminal emulation control.</dd> @@ -2133,7 +2168,7 @@ </div> </div> <div class="section" id="project-management"> -<h2><a class="toc-backref" href="#id104">Project Management</a></h2> +<h2><a class="toc-backref" href="#id105">Project Management</a></h2> <p>Project Management is optional in Geany. Currently it can be used for:</p> <ul class="simple"> <li>Storing and opening session files on a project basis.</li> @@ -2151,7 +2186,7 @@ file that was in use at the end of the last session will be reopened.</p> <p>Below are the commands used to create, modify, open and close projects.</p> <div class="section" id="new-project"> -<h3><a class="toc-backref" href="#id105">New Project</a></h3> +<h3><a class="toc-backref" href="#id106">New Project</a></h3> <p>To create a new project, fill in the <em>Name</em> field. By default this will setup a new project file <tt class="docutils literal"><span class="pre">~/projects/name.geany</span></tt>. Usually it's best to store all your project files in the same directory (they are @@ -2161,7 +2196,7 @@ structure contained in it.</p> </div> <div class="section" id="project-properties"> -<h3><a class="toc-backref" href="#id106">Project Properties</a></h3> +<h3><a class="toc-backref" href="#id107">Project Properties</a></h3> <p>You can set an optional description for the project, but it is not used elsewhere by Geany.</p> <p>The <em>Base path</em> field is used as the directory to run the Make and Make @@ -2170,13 +2205,13 @@ The specified path can be an absolute path or relative to the project's file name.</p> <div class="section" id="make-in-base-path"> -<h4><a class="toc-backref" href="#id107">Make in base path</a></h4> +<h4><a class="toc-backref" href="#id108">Make in base path</a></h4> <p>This setting makes the <em>Build->Make</em> command use the project's base path. Uncheck this if you want to use the current file's directory instead.</p> </div> <div class="section" id="run-command"> -<h4><a class="toc-backref" href="#id108">Run command</a></h4> +<h4><a class="toc-backref" href="#id109">Run command</a></h4> <p>The <em>Run command</em> overrides the default run command. You can set this to the executable or main script file for the project, and append any command-line arguments.</p> @@ -2189,7 +2224,7 @@ </div> </div> <div class="section" id="open-project"> -<h3><a class="toc-backref" href="#id109">Open Project</a></h3> +<h3><a class="toc-backref" href="#id110">Open Project</a></h3> <p>The Open command displays a standard file chooser, starting in <tt class="docutils literal"><span class="pre">~/projects</span></tt>. Choose a project file named with the <tt class="docutils literal"><span class="pre">.geany</span></tt> extension.</p> @@ -2197,14 +2232,14 @@ open files and open the session files associated with the project.</p> </div> <div class="section" id="close-project"> -<h3><a class="toc-backref" href="#id110">Close Project</a></h3> +<h3><a class="toc-backref" href="#id111">Close Project</a></h3> <p>Project file settings are saved when the project is closed.</p> <p>When project session support is enabled, Geany will close the project session files and open any previously closed default session files.</p> </div> </div> <div class="section" id="build-system"> -<h2><a class="toc-backref" href="#id111">Build system</a></h2> +<h2><a class="toc-backref" href="#id112">Build system</a></h2> <p>Geany has an integrated build system. Firstly this means that the current source file will be saved before it is processed. This is for convenience so that you don't need to keep saving small changes @@ -2234,7 +2269,7 @@ <li>Set Includes and Arguments</li> </ul> <div class="section" id="compile"> -<h3><a class="toc-backref" href="#id112">Compile</a></h3> +<h3><a class="toc-backref" href="#id113">Compile</a></h3> <p>The Compile command has different uses for different kinds of files.</p> <p>For compilable languages such as C and C++, the Compile command is setup to compile the current source file into a binary object file.</p> @@ -2244,7 +2279,7 @@ will run the file in its language interpreter.</p> </div> <div class="section" id="build"> -<h3><a class="toc-backref" href="#id113">Build</a></h3> +<h3><a class="toc-backref" href="#id114">Build</a></h3> <p>For compilable languages such as C and C++, the Build command will link the current source file's equivalent object file into an executable. If the object file does not exist, the source will be compiled and linked @@ -2252,7 +2287,7 @@ <p>Interpreted languages do not use the Build command.</p> </div> <div class="section" id="make-all"> -<h3><a class="toc-backref" href="#id114">Make all</a></h3> +<h3><a class="toc-backref" href="#id115">Make all</a></h3> <p>This effectively runs "make all" in the same directory as the current file.</p> <div class="note"> @@ -2262,19 +2297,19 @@ </div> </div> <div class="section" id="make-custom-target"> -<h3><a class="toc-backref" href="#id115">Make custom target</a></h3> +<h3><a class="toc-backref" href="#id116">Make custom target</a></h3> <p>This is similar to running 'Make all' but you will be prompted for the make target name to be passed to the Make tool. For example, typing 'clean' in the dialog prompt will run "make clean".</p> </div> <div class="section" id="make-object"> -<h3><a class="toc-backref" href="#id116">Make object</a></h3> +<h3><a class="toc-backref" href="#id117">Make object</a></h3> <p>Make object will run "make current_file.o" in the same directory as the current file, using its prefix for 'current_file'. It is useful for compiling just the current file without building the whole project.</p> </div> <div class="section" id="execute"> -<h3><a class="toc-backref" href="#id117">Execute</a></h3> +<h3><a class="toc-backref" href="#id118">Execute</a></h3> <p>Execute will run the corresponding executable file, shell script or interpreted script in a terminal window. Note that the Terminal tool path must be correctly set in the Tools tab of the Preferences dialog - @@ -2285,7 +2320,7 @@ output from the program before the terminal window is closed.</p> </div> <div class="section" id="stopping-running-processes"> -<h3><a class="toc-backref" href="#id118">Stopping running processes</a></h3> +<h3><a class="toc-backref" href="#id119">Stopping running processes</a></h3> <p>When there is a running program, the Run button in the toolbar becomes a stop button and you can stop the current action. This works by sending a signal to the process (and its child process(es)) @@ -2294,7 +2329,7 @@ cannot be stopped. This can happen when the process creates more than one child process.</p> <div class="section" id="terminal-emulators"> -<h4><a class="toc-backref" href="#id119">Terminal emulators</a></h4> +<h4><a class="toc-backref" href="#id120">Terminal emulators</a></h4> <p>Xterm is known to work properly. If you are using "Terminal" (the terminal program of Xfce), you should add the command line option <tt class="docutils literal"><span class="pre">--disable-server</span></tt> otherwise the started process cannot be @@ -2303,7 +2338,7 @@ </div> </div> <div class="section" id="set-includes-and-arguments"> -<h3><a class="toc-backref" href="#id120">Set Includes and Arguments</a></h3> +<h3><a class="toc-backref" href="#id121">Set Includes and Arguments</a></h3> <p>By default the Compile and Build commands invoke the compiler and linker with only the basic arguments needed by all programs. Using Set Includes and Arguments you can add any include paths and compile @@ -2324,14 +2359,14 @@ </ul> <p>See <a class="reference internal" href="#build-settings-section">[build_settings] Section</a> for details.</p> <div class="section" id="one-step-compilation"> -<h4><a class="toc-backref" href="#id121">One step compilation</a></h4> +<h4><a class="toc-backref" href="#id122">One step compilation</a></h4> <p>If you are using the Build command to compile and link in one step, you will need to set both the compiler arguments and the linker arguments in the linker command setting.</p> </div> </div> <div class="section" id="indicators"> -<h3><a class="toc-backref" href="#id122">Indicators</a></h3> +<h3><a class="toc-backref" href="#id123">Indicators</a></h3> <p>Indicators are red squiggly underlines which are used to highlight errors which occurred while compiling the current file. So you can easily see where your code failed to compile. To remove the indicators, @@ -2341,7 +2376,7 @@ </div> </div> <div class="section" id="printing-support"> -<h2><a class="toc-backref" href="#id123">Printing support</a></h2> +<h2><a class="toc-backref" href="#id124">Printing support</a></h2> <p>Since Geany 0.13 there is full printing support using GTK's printing API. The printed page(s) will look nearly the same as on your screen in Geany. Additionally, there are some options to modify the printed page(s). You @@ -2389,7 +2424,7 @@ gtklp or similar programs can be used.</p> </div> <div class="section" id="plugins"> -<h2><a class="toc-backref" href="#id124">Plugins</a></h2> +<h2><a class="toc-backref" href="#id125">Plugins</a></h2> <p>Plugins are loaded at startup, if the <em>Enable plugin support</em> general preference is set. There is also a command-line option, <tt class="docutils literal"><span class="pre">-p</span></tt>, which prevents plugins being loaded. Plugins are scanned in @@ -2411,13 +2446,13 @@ which are included in Geany.</p> </div> <div class="section" id="keybindings"> -<h2><a class="toc-backref" href="#id125">Keybindings</a></h2> +<h2><a class="toc-backref" href="#id126">Keybindings</a></h2> <p>Geany supports the default keyboard shortcuts for the Scintilla editing widget. For a list of these commands, see <a class="reference internal" href="#scintilla-keyboard-commands">Scintilla keyboard commands</a>. The Scintilla keyboard shortcuts will be overridden by any custom keybindings with the same keyboard shortcut.</p> <div class="section" id="switching-documents"> -<h3><a class="toc-backref" href="#id126">Switching documents</a></h3> +<h3><a class="toc-backref" href="#id127">Switching documents</a></h3> <p>There are a few non-configurable bindings to switch between documents, listed below. These can also be overridden by custom keybindings.</p> <table border="1" class="docutils"> @@ -2447,7 +2482,7 @@ </table> </div> <div class="section" id="configurable-keybindings"> -<h3><a class="toc-backref" href="#id127">Configurable keybindings</a></h3> +<h3><a class="toc-backref" href="#id128">Configurable keybindings</a></h3> <p>For all actions listed below you can define your own keybindings. Open the Preferences dialog, select the desired action and click on change. In the opening dialog you can press any key combination you @@ -3045,9 +3080,9 @@ </div> </div> <div class="section" id="configuration-files"> -<h1><a class="toc-backref" href="#id128">Configuration files</a></h1> +<h1><a class="toc-backref" href="#id129">Configuration files</a></h1> <div class="section" id="global-configuration-file"> -<h2><a class="toc-backref" href="#id129">Global configuration file</a></h2> +<h2><a class="toc-backref" href="#id130">Global configuration file</a></h2> <p>You can use a global configuration file for Geany which will be used if the user starts Geany for the first time and an user's configuration file was not yet created or in case an user deleted the configuration @@ -3067,7 +3102,7 @@ </div> </div> <div class="section" id="filetype-definition-files"> -<h2><a class="toc-backref" href="#id130">Filetype definition files</a></h2> +<h2><a class="toc-backref" href="#id131">Filetype definition files</a></h2> <p>All color definitions and other filetype specific settings are stored in the filetype definition files. Those settings are colors for syntax highlighting, general settings like comment characters or @@ -3095,9 +3130,9 @@ to change. All missing settings will be read from the corresponding global definition file in <tt class="docutils literal"><span class="pre">$prefix/share/geany</span></tt>.</p> <div class="section" id="format"> -<h3><a class="toc-backref" href="#id131">Format</a></h3> +<h3><a class="toc-backref" href="#id132">Format</a></h3> <div class="section" id="styling-section"> -<h4><a class="toc-backref" href="#id132">[styling] Section</a></h4> +<h4><a class="toc-backref" href="#id133">[styling] Section</a></h4> <p>In this section the colors for syntax highlighting are defined. The format is always: key=foreground_color;background_color;bold;italic</p> <p>Colors have to be specified as RGB hex values prefixed by @@ -3107,7 +3142,7 @@ value is something other than "true" or "false", "false" is assumed.</p> </div> <div class="section" id="keywords-section"> -<h4><a class="toc-backref" href="#id133">[keywords] Section</a></h4> +<h4><a class="toc-backref" href="#id134">[keywords] Section</a></h4> <p>This section contains keys for different keyword lists specific to the filetype. Some filetypes do not support keywords, so adding a new key will not work. You can only add or remove keywords to/from @@ -3118,7 +3153,7 @@ </div> </div> <div class="section" id="settings-section"> -<h4><a class="toc-backref" href="#id134">[settings] Section</a></h4> +<h4><a class="toc-backref" href="#id135">[settings] Section</a></h4> <dl class="docutils"> <dt>extension</dt> <dd><p class="first">This is the default file extension used when saving files, not @@ -3179,7 +3214,7 @@ </dl> </div> <div class="section" id="build-settings-section"> -<h4><a class="toc-backref" href="#id135">[build_settings] Section</a></h4> +<h4><a class="toc-backref" href="#id136">[build_settings] Section</a></h4> <dl class="docutils"> <dt>error_regex</dt> <dd><p class="first">This is a GNU-style extended regular expression to parse a filename @@ -3228,7 +3263,7 @@ </div> </div> <div class="section" id="special-file-filetypes-common"> -<h3><a class="toc-backref" href="#id136">Special file filetypes.common</a></h3> +<h3><a class="toc-backref" href="#id137">Special file filetypes.common</a></h3> <p>There is a special filetype definition file called filetypes.common. This file defines some general non-filetype-specific settings.</p> @@ -3394,7 +3429,7 @@ </div> </div> <div class="section" id="filetype-extensions"> -<h2><a class="toc-backref" href="#id137">Filetype extensions</a></h2> +<h2><a class="toc-backref" href="#id138">Filetype extensions</a></h2> <p>To change the default filetype extension used when saving a new file, see <a class="reference internal" href="#filetype-definition-files">Filetype definition files</a>.</p> <p>You can override the list of file extensions that Geany uses for each @@ -3420,7 +3455,7 @@ </pre> </div> <div class="section" id="templates"> -<h2><a class="toc-backref" href="#id138">Templates</a></h2> +<h2><a class="toc-backref" href="#id139">Templates</a></h2> <p>Geany supports the following templates:</p> <ul class="simple"> <li>ChangeLog entry</li> @@ -3443,7 +3478,7 @@ function description won't contain the correct function name but "unknown" instead.</p> <div class="section" id="template-meta-data"> -<h3><a class="toc-backref" href="#id139">Template meta data</a></h3> +<h3><a class="toc-backref" href="#id140">Template meta data</a></h3> <p>Meta data can be used with all templates, but by default user set meta data is only used for the ChangeLog and File header templates.</p> <p>In the configuration dialog you can find a tab "Templates" (see @@ -3453,7 +3488,7 @@ at startup.</p> </div> <div class="section" id="file-templates"> -<h3><a class="toc-backref" href="#id140">File templates</a></h3> +<h3><a class="toc-backref" href="#id141">File templates</a></h3> <p>File templates are templates used as the basis of a new file. To use them, choose the <em>New (with Template)</em> menu item from the <em>File</em> menu.</p> @@ -3465,7 +3500,7 @@ be placed anywhere, but is usually on the first line of the file, followed by a blank line.</p> <div class="section" id="custom-file-templates"> -<h4><a class="toc-backref" href="#id141">Custom file templates</a></h4> +<h4><a class="toc-backref" href="#id142">Custom file templates</a></h4> <p>These are read from the <tt class="docutils literal"><span class="pre">~/.config/geany/templates/files</span></tt> directory (created the first time Geany is started). The filetype to use is detected from the template file's extension, if any. For example, creating @@ -3476,7 +3511,7 @@ template.</p> </div> <div class="section" id="filetype-templates"> -<h4><a class="toc-backref" href="#id142">Filetype templates</a></h4> +<h4><a class="toc-backref" href="#id143">Filetype templates</a></h4> <p>Filetype template files are read from the <tt class="docutils literal"><span class="pre">~/.config/geany/templates</span></tt> directory, and are named "filetype." followed by the filetype name, e.g. "filetype.python", "filetype.sh", etc. If you are @@ -3488,7 +3523,7 @@ </div> </div> <div class="section" id="customizing-templates"> -<h3><a class="toc-backref" href="#id143">Customizing templates</a></h3> +<h3><a class="toc-backref" href="#id144">Customizing templates</a></h3> <p>Each template can be customized to your needs. The templates are stored in the <tt class="docutils literal"><span class="pre">~/.config/geany/templates/</span></tt> directory (see the section called <a class="reference internal" href="#command-line-options">Command line options</a> for further information about the configuration @@ -3496,7 +3531,7 @@ Geany ;-) ) and edit the template to your needs. There are some wildcards which will be automatically replaced by Geany at startup.</p> <div class="section" id="template-wildcards"> -<h4><a class="toc-backref" href="#id144">Template wildcards</a></h4> +<h4><a class="toc-backref" href="#id145">Template wildcards</a></h4> <p>All wildcards must be enclosed by "{" and "}", e.g. {date}.</p> <table border="1" class="docutils"> <colgroup> @@ -3617,7 +3652,7 @@ </div> </div> <div class="section" id="customizing-the-toolbar"> -<h2><a class="toc-backref" href="#id145">Customizing the toolbar</a></h2> +<h2><a class="toc-backref" href="#id146">Customizing the toolbar</a></h2> <p>You can add, remove and reorder the elements in the toolbar by editing the file <tt class="docutils literal"><span class="pre">ui_toolbar.xml</span></tt>.</p> <p>To override the system-wide configuration file, copy it from @@ -3643,7 +3678,7 @@ </ol> </div> <div class="section" id="available-toolbar-elements"> -<h3><a class="toc-backref" href="#id146">Available toolbar elements</a></h3> +<h3><a class="toc-backref" href="#id147">Available toolbar elements</a></h3> <table border="1" class="docutils"> <colgroup> <col width="19%" /> @@ -3746,9 +3781,9 @@ </div> </div> <div class="section" id="plugin-documentation"> -<h1><a class="toc-backref" href="#id147">Plugin documentation</a></h1> +<h1><a class="toc-backref" href="#id148">Plugin documentation</a></h1> <div class="section" id="instant-save"> -<h2><a class="toc-backref" href="#id148">Instant Save</a></h2> +<h2><a class="toc-backref" href="#id149">Instant Save</a></h2> <p>This plugin sets on every new file (File->New or File-> New (with template)) a randomly chosen filename and set its filetype appropriate to the used template or when no template was used, to a configurable default filetype. @@ -3758,7 +3793,7 @@ similar.</p> </div> <div class="section" id="backup-copy"> -<h2><a class="toc-backref" href="#id149">Backup Copy</a></h2> +<h2><a class="toc-backref" href="#id150">Backup Copy</a></h2> <p>This plugin creates a backup copy of the current file in Geany when it is saved. You can specify the directory where the backup copy is saved and you can configure the automatically added extension in the configure dialog @@ -3768,7 +3803,7 @@ </div> </div> <div class="section" id="contributing-to-this-document"> -<h1><a class="toc-backref" href="#id150">Contributing to this document</a></h1> +<h1><a class="toc-backref" href="#id151">Contributing to this document</a></h1> <p>This document (<tt class="docutils literal"><span class="pre">geany.txt</span></tt>) is written in <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> (or "reST"). The source file for it is located in Geany's <tt class="docutils literal"><span class="pre">doc</span></tt> subdirectory. If you intend on making changes, you should grab the @@ -3788,7 +3823,7 @@ and Fedora systems.</p> </div> <div class="section" id="scintilla-keyboard-commands"> -<h1><a class="toc-backref" href="#id151">Scintilla keyboard commands</a></h1> +<h1><a class="toc-backref" href="#id152">Scintilla keyboard commands</a></h1> <p>Copyright © 1998, 2006 Neil Hodgson <neilh(at)scintilla(dot)org></p> <p>This appendix is distributed under the terms of the License for Scintilla and SciTE. A copy of this license can be found in the file @@ -3797,7 +3832,7 @@ Scintilla and SciTE</a>.</p> <p>20 June 2006</p> <div class="section" id="keyboard-commands"> -<h2><a class="toc-backref" href="#id152">Keyboard commands</a></h2> +<h2><a class="toc-backref" href="#id153">Keyboard commands</a></h2> <p>Keyboard commands for Scintilla mostly follow common Windows and GTK+ conventions. All move keys (arrows, page up/down, home and end) allows to extend or reduce the stream selection when holding the @@ -3885,9 +3920,9 @@ </div> </div> <div class="section" id="tips-and-tricks"> -<h1><a class="toc-backref" href="#id153">Tips and tricks</a></h1> +<h1><a class="toc-backref" href="#id154">Tips and tricks</a></h1> <div class="section" id="document-notebook"> -<h2><a class="toc-backref" href="#id154">Document notebook</a></h2> +<h2><a class="toc-backref" href="#id155">Document notebook</a></h2> <ul class="simple"> <li>Double-click on empty space in the notebook tab bar to open a new document.</li> @@ -3898,7 +3933,7 @@ </ul> </div> <div class="section" id="editor"> -<h2><a class="toc-backref" href="#id155">Editor</a></h2> +<h2><a class="toc-backref" href="#id156">Editor</a></h2> <ul class="simple"> <li>Alt-scroll wheel moves up/down a page.</li> <li>Ctrl-scroll wheel zooms in/out.</li> @@ -3908,13 +3943,13 @@ </ul> </div> <div class="section" id="interface"> -<h2><a class="toc-backref" href="#id156">Interface</a></h2> +<h2><a class="toc-backref" href="#id157">Interface</a></h2> <ul class="simple"> <li>Double-click on a symbol-list group to expand or compact it.</li> </ul> </div> <div class="section" id="gtk-related"> -<h2><a class="toc-backref" href="#id157">GTK-related</a></h2> +<h2><a class="toc-backref" href="#id158">GTK-related</a></h2> <ul class="simple"> <li>Scrolling the mouse wheel over a notebook tab bar will switch notebook pages.</li> @@ -3929,7 +3964,7 @@ </div> </div> <div class="section" id="hidden-preferences"> -<h1><a class="toc-backref" href="#id158">Hidden preferences</a></h1> +<h1><a class="toc-backref" href="#id159">Hidden preferences</a></h1> <p>There are some uncommon preferences that are not shown in the Preferences dialog. These can be set by editing <tt class="docutils literal"><span class="pre">~/.config/geany/geany.conf</span></tt>, then restarting Geany. Search for the key name, then edit the value. Example:</p> @@ -4002,7 +4037,7 @@ </table> </div> <div class="section" id="compile-time-options"> -<h1><a class="toc-backref" href="#id159">Compile-time options</a></h1> +<h1><a class="toc-backref" href="#id160">Compile-time options</a></h1> <p>There are some options which can only be changed at compile time, and some options which are used as the default for configurable options. To change these options, edit the appropriate source file @@ -4014,7 +4049,7 @@ <p class="last">Most users should not need to change these options.</p> </div> <div class="section" id="src-geany-h"> -<h2><a class="toc-backref" href="#id160">src/geany.h</a></h2> +<h2><a class="toc-backref" href="#id161">src/geany.h</a></h2> <table border="1" class="docutils"> <colgroup> <col width="33%" /> @@ -4071,7 +4106,7 @@ </table> </div> <div class="section" id="project-h"> -<h2><a class="toc-backref" href="#id161">project.h</a></h2> +<h2><a class="toc-backref" href="#id162">project.h</a></h2> <table border="1" class="docutils"> <colgroup> <col width="33%" /> @@ -4096,7 +4131,7 @@ </table> </div> <div class="section" id="editor-h"> -<h2><a class="toc-backref" href="#id162">editor.h</a></h2> +<h2><a class="toc-backref" href="#id163">editor.h</a></h2> <table border="1" class="docutils"> <colgroup> <col width="33%" /> @@ -4122,7 +4157,7 @@ </table> </div> <div class="section" id="keyfile-c"> -<h2><a class="toc-backref" href="#id163">keyfile.c</a></h2> +<h2><a class="toc-backref" href="#id164">keyfile.c</a></h2> <p>These are default settings that can be overridden in the <a class="reference internal" href="#preferences">Preferences</a> dialog.</p> <table border="1" class="docutils"> <colgroup> @@ -4204,7 +4239,7 @@ </div> </div> <div class="section" id="gnu-general-public-license"> -<h1><a class="toc-backref" href="#id164">GNU General Public License</a></h1> +<h1><a class="toc-backref" href="#id165">GNU General Public License</a></h1> <pre class="literal-block"> GNU GENERAL PUBLIC LICENSE Version 2, June 1991 @@ -4549,7 +4584,7 @@ </pre> </div> <div class="section" id="license-for-scintilla-and-scite"> -<h1><a class="toc-backref" href="#id165">License for Scintilla and SciTE</a></h1> +<h1><a class="toc-backref" href="#id166">License for Scintilla and SciTE</a></h1> <p>Copyright 1998-2003 by Neil Hodgson <neilh(at)scintilla(dot)org></p> <p>All Rights Reserved</p> <p>Permission to use, copy, modify, and distribute this software and @@ -4569,7 +4604,7 @@ <div class="footer"> <hr class="footer" /> <a class="reference external" href="geany.txt">View document source</a>. -Generated on: 2009-01-11 20:50 UTC. +Generated on: 2009-01-14 15:59 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt =================================================================== --- trunk/doc/geany.txt 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/doc/geany.txt 2009-01-14 16:08:00 UTC (rev 3465) @@ -1205,22 +1205,58 @@ * Python
-Generating a global tags file -````````````````````````````` +Global tags file format +```````````````````````
+Global tags files can have two different formats:
-*Filetypes support:* +* Tagmanager format +* Pipe-separated format
-Currently this is not yet supported for Pascal, PHP and LaTeX -filetypes. +The first line of global tags files should be a comment, introduced +by ``#`` followed by a space and a string like ``format=pipe`` +respectively ``format=tagmanager`` (case-sensitive). +This helps Geany to read the file properly. If this line +is missing, Geany tries to auto-detect the used format but this +might fail.
+ +The Tagmanager format is a bit more complex and is used for files +created by the ``geany -g`` command. There is one tag per line. +Different tag attributes like the return value or the argument list +are separated with different characters indicating the type of the +following argument. + +The Pipe-separated format is easier to read and write. +There is one tag per line and different tag attributes are separated +by the pipe character (``|``). A line looks like:: + + basename|string|(string path [, string suffix])| + +| The first field is the tag name (usually a function name). +| The second field is the type of the return value. +| The third field is the argument list for this tag. +| The fourth field is the description for this tag but + currently unused and should be left empty. + +Except for the first field (tag name), all other field can be left +empty but the pipe separator must appear for them. + +You can easily write your own global tag files using this format. +Just save them in your tags directory, as described earlier in the +section `Global tags`_. + + +Generating a global tags file +````````````````````````````` + You can generate your own global tags files by parsing a list of source files. The command is::
geany -g [-P] <Tag File> <File list>
-* Tag File should be in the format described earlier -- see the - section called `Global tags`_. +* Tag File filename should be in the format described earlier -- + see the section called `Global tags`_. * File list is a list of filenames, each with a full path (unless you are generating C/C++ tags and have set the CFLAGS environment variable appropriately).
Modified: trunk/scripts/create_php_tags.php =================================================================== --- trunk/scripts/create_php_tags.php 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/scripts/create_php_tags.php 2009-01-14 16:08:00 UTC (rev 3465) @@ -59,8 +59,9 @@ TA_ARGLIST, $funcDefMatch['params'], TA_VARTYPE, $funcDefMatch['retType']); }
-$tagsOutput[] = sprintf('# Automatically generated file - do not edit (created on %s)', - date('r')); +$tagsOutput[] = sprintf( + '# format=tagmanager - Automatically generated file - do not edit (created on %s)', + date('r')); // Sort the output sort($tagsOutput);
Modified: trunk/scripts/create_py_tags.py =================================================================== --- trunk/scripts/create_py_tags.py 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/scripts/create_py_tags.py 2009-01-14 16:08:00 UTC (rev 3465) @@ -265,7 +265,8 @@ tags.sort() # write them fp = open(tag_filename, 'wb') - fp.write('# Automatically generated file - do not edit (created on %s)\n' % \ + fp.write( + '# format=tagmanager - Automatically generated file - do not edit (created on %s)\n' % \ datetime.datetime.now().ctime()) for s in tags: if not s == '\n': # skip empty lines
Modified: trunk/tagmanager/include/tm_tag.h =================================================================== --- trunk/tagmanager/include/tm_tag.h 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/tagmanager/include/tm_tag.h 2009-01-14 16:08:00 UTC (rev 3465) @@ -199,7 +199,7 @@ Same as tm_tag_new() except that the tag attributes are read from file. \param mode langType to use for the tag. */ -TMTag *tm_tag_new_from_file(TMSourceFile *file, FILE *fp, gint mode); +TMTag *tm_tag_new_from_file(TMSourceFile *file, FILE *fp, gint mode, gboolean format_pipe);
/*! Writes tag information to the given FILE *.
Modified: trunk/tagmanager/tm_project.c =================================================================== --- trunk/tagmanager/tm_project.c 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/tagmanager/tm_project.c 2009-01-14 16:08:00 UTC (rev 3465) @@ -385,7 +385,7 @@ tm_project_set_ignorelist(project); if (NULL == (fp = g_fopen(project->work_object.file_name, "r"))) return FALSE; - while (NULL != (tag = tm_tag_new_from_file(source_file, fp, 0))) + while (NULL != (tag = tm_tag_new_from_file(source_file, fp, 0, FALSE))) { if (tm_tag_file_t == tag->type) {
Modified: trunk/tagmanager/tm_tag.c =================================================================== --- trunk/tagmanager/tm_tag.c 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/tagmanager/tm_tag.c 2009-01-14 16:08:00 UTC (rev 3465) @@ -300,7 +300,7 @@ tag->atts.entry.impl = *(start + 1); break; default: -#ifdef TM_DEBUG +#ifdef GEANY_DEBUG g_warning("Unknown attribute %s", start + 1); #endif break; @@ -359,24 +359,18 @@ return TRUE; }
-TMTag *tm_tag_new_from_file(TMSourceFile *file, FILE *fp, gint mode) +TMTag *tm_tag_new_from_file(TMSourceFile *file, FILE *fp, gint mode, gboolean format_pipe) { TMTag *tag; gboolean result;
TAG_NEW(tag);
- switch (mode) - { - case 4: /* pascal */ - case 8: /* latex */ - result = tm_tag_init_from_file_alt(tag, file, fp); - break; + if (format_pipe) + result = tm_tag_init_from_file_alt(tag, file, fp); + else + result = tm_tag_init_from_file(tag, file, fp);
- default: - result = tm_tag_init_from_file(tag, file, fp); - } - if (! result) { TAG_FREE(tag);
Modified: trunk/tagmanager/tm_workspace.c =================================================================== --- trunk/tagmanager/tm_workspace.c 2009-01-12 17:20:43 UTC (rev 3464) +++ trunk/tagmanager/tm_workspace.c 2009-01-14 16:08:00 UTC (rev 3465) @@ -142,8 +142,10 @@
gboolean tm_workspace_load_global_tags(const char *tags_file, gint mode) { + guchar buf[BUFSIZ]; FILE *fp; TMTag *tag; + gboolean format_pipe = FALSE;
if (NULL == (fp = g_fopen(tags_file, "r"))) return FALSE; @@ -151,7 +153,29 @@ return FALSE; if (NULL == theWorkspace->global_tags) theWorkspace->global_tags = g_ptr_array_new(); - while (NULL != (tag = tm_tag_new_from_file(NULL, fp, mode))) + if ((NULL == fgets((gchar*) buf, BUFSIZ, fp)) || ('\0' == *buf)) + return FALSE; /* early out on error */ + else + { /* We read the first line for the format specification. */ + if (buf[0] == '#' && strstr((gchar*) buf, "format=pipe") != NULL) + format_pipe = TRUE; + else if (buf[0] == '#' && strstr((gchar*) buf, "format=tagmanager") != NULL) + format_pipe = FALSE; + else + { /* We didn't find a valid format specification, so we try to auto-detect the format + * by counting the pipe characters on the first line and asumme pipe format when + * we find more than one pipe on the line. */ + guint i, pipe_cnt = 0; + for (i = 0; i < BUFSIZ && buf[i] != '\0' && pipe_cnt < 2; i++) + { + if (buf[i] == '|') + pipe_cnt++; + } + format_pipe = (pipe_cnt > 1); + } + rewind(fp); /* reset the file pointer, to start reading again from the beginning */ + } + while (NULL != (tag = tm_tag_new_from_file(NULL, fp, mode, format_pipe))) g_ptr_array_add(theWorkspace->global_tags, tag); fclose(fp);
@@ -409,6 +433,7 @@ tm_source_file_free(source_file); return FALSE; } + fprintf(fp, "# format=tagmanager\n"); for (i = 0; i < tags_array->len; ++i) { tm_tag_write(TM_TAG(tags_array->pdata[i]), fp, tm_tag_attr_type_t
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.