Eskil

Diff
Login

Differences From Artifact [7472f1ee9f]:

To Artifact [c9cc42b35b]:


17
18
19
20
21
22
23



24
25
26
27
28
29
30
<h1>Usage</h1>

The command line options for plugins are:
  *  -plugin plugin     : Use plugin
  *  -plugininfo info   : Pass info to plugin (plugin specific)
  *  -plugindump plugin : Dump plugin source to stdout
  *  -pluginlist        : List known plugins




<h1>General Format</h1>

A plugin is a Tcl script file that must start with the verbatim sequence
"##Eskil Plugin :". A plugin is sourced and used in its own safe
interpreter and thus have free access to its own global space. Hookup
points are defined by declaring specifically named procedures as specified







>
>
>







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<h1>Usage</h1>

The command line options for plugins are:
  *  -plugin plugin     : Use plugin
  *  -plugininfo info   : Pass info to plugin (plugin specific)
  *  -plugindump plugin : Dump plugin source to stdout
  *  -pluginlist        : List known plugins
  *  -pluginallow       : Allow full access for a plugin.

A plugin may further define command line options that it accepts.

<h1>General Format</h1>

A plugin is a Tcl script file that must start with the verbatim sequence
"##Eskil Plugin :". A plugin is sourced and used in its own safe
interpreter and thus have free access to its own global space. Hookup
points are defined by declaring specifically named procedures as specified
38
39
40
41
42
43
44










45
46
47
48
49
50
51

A plugin is set up with these global variables filled in:
  *  ::WhoAmI : The name of the plugin
  *  ::Info   : The contents of -plugininfo parameter
  *  ::Pref   : A copy if Eskil's internal preferences array.
  *  ::argv   : A copy of the command line from Eskil's invocation











<h1>File plugin</h1>

To process the files being compared, the following procedure should be
defined in the plugin file:

<pre>proc PreProcess {side chi cho} {...}</pre>








>
>
>
>
>
>
>
>
>
>







41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

A plugin is set up with these global variables filled in:
  *  ::WhoAmI : The name of the plugin
  *  ::Info   : The contents of -plugininfo parameter
  *  ::Pref   : A copy if Eskil's internal preferences array.
  *  ::argv   : A copy of the command line from Eskil's invocation

<h2>Additional options</h2>
A plugin can declare command line options that should be accepted by Eskil.
They will be passed on to the plugin through the ::argv list.
If the initial "##Eskil" line is followed by comments formatted as below,
it adds options. Any empty line will end parsing for such lines.

A line like "## Option -<option>" declares an option that takes a value and
a line lile "## Flag -<option>" declares an option without value. The rest of
the line after the option name is ignored and can be used for comments.

<h1>File plugin</h1>

To process the files being compared, the following procedure should be
defined in the plugin file:

<pre>proc PreProcess {side chi cho} {...}</pre>

86
87
88
89
90
91
92
93
94
95
96
97

The FileCompare procedure can give the following return values:

  *  0 : Files are not equal
  *  1 : Files are equal
  *  2 : Files are equal as far as the channels have been read.
         Let the normal comparison finish the job.












<
<
<
<
<
99
100
101
102
103
104
105






The FileCompare procedure can give the following return values:

  *  0 : Files are not equal
  *  1 : Files are equal
  *  2 : Files are equal as far as the channels have been read.
         Let the normal comparison finish the job.