<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://cegui.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Migration_to_MIT_tool</id>
		<title>Migration to MIT tool - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://cegui.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Migration_to_MIT_tool"/>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Migration_to_MIT_tool&amp;action=history"/>
		<updated>2026-06-16T09:10:12Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Migration_to_MIT_tool&amp;diff=3749&amp;oldid=prev</id>
		<title>Capek: Robot: Cosmetic changes</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Migration_to_MIT_tool&amp;diff=3749&amp;oldid=prev"/>
				<updated>2011-02-26T16:16:41Z</updated>
		
		<summary type="html">&lt;p&gt;Robot: Cosmetic changes&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 16:16, 26 February 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[category: CEGUI Developer Team]]&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We use those script / program to update the license of CEGUI sources to MIT. If you need those program to do similar stuff in your project, it's here :) &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;We use those script / program to update the license of CEGUI sources to MIT. If you need those program to do similar stuff in your project, it's here :) &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Driver script == &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Driver script ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''license_change.sh''' &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''license_change.sh''' &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #!/bin/sh &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #!/bin/sh &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; cegui_switch_license $license $convert&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; cegui_switch_license $license $convert&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Converter == &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Converter ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''cegui_switch_license.c'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''cegui_switch_license.c'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #include &amp;lt;ctype.h&amp;gt; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; #include &amp;lt;ctype.h&amp;gt; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 215:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 212:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; *&amp;#160;  OTHER DEALINGS IN THE SOFTWARE.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; *&amp;#160;  OTHER DEALINGS IN THE SOFTWARE.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; ***************************************************************************/&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160; ***************************************************************************/&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:CEGUI Developer Team]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Capek</name></author>	</entry>

	<entry>
		<id>http://cegui.org/wiki/index.php?title=Migration_to_MIT_tool&amp;diff=2167&amp;oldid=prev</id>
		<title>Dalfy at 06:26, 24 May 2006</title>
		<link rel="alternate" type="text/html" href="http://cegui.org/wiki/index.php?title=Migration_to_MIT_tool&amp;diff=2167&amp;oldid=prev"/>
				<updated>2006-05-24T06:26:53Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[category: CEGUI Developer Team]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We use those script / program to update the license of CEGUI sources to MIT. If you need those program to do similar stuff in your project, it's here :) &lt;br /&gt;
== Driver script == &lt;br /&gt;
'''license_change.sh''' &lt;br /&gt;
 #!/bin/sh &lt;br /&gt;
 &lt;br /&gt;
 dir=&amp;quot;$1&amp;quot;&lt;br /&gt;
 license=&amp;quot;$2&amp;quot;&lt;br /&gt;
 filesHeaders=`find $dir -name &amp;quot;*.h&amp;quot;`&lt;br /&gt;
 filesSources=`find $dir -name &amp;quot;*.cpp&amp;quot;`&lt;br /&gt;
 files=&amp;quot;$filesHeaders $filesSources&amp;quot; &lt;br /&gt;
 &lt;br /&gt;
 # find the list of file to be converted &lt;br /&gt;
 for name in $files ; &lt;br /&gt;
 do&lt;br /&gt;
    &lt;br /&gt;
   if grep &amp;quot;GNU Lesser&amp;quot; -q $name ;&lt;br /&gt;
   then&lt;br /&gt;
     convert=&amp;quot;$convert $name&amp;quot;&lt;br /&gt;
   fi&lt;br /&gt;
 done&lt;br /&gt;
 #echo &amp;quot;License file: $license&amp;quot;&lt;br /&gt;
 #echo &amp;quot;File to update: $convert&amp;quot;&lt;br /&gt;
 cegui_switch_license $license $convert&lt;br /&gt;
&lt;br /&gt;
== Converter == &lt;br /&gt;
'''cegui_switch_license.c'''&lt;br /&gt;
 #include &amp;lt;ctype.h&amp;gt; &lt;br /&gt;
 #include &amp;lt;unistd.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;string.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;errno.h&amp;gt;&lt;br /&gt;
 #include &amp;lt;dirent.h&amp;gt; &lt;br /&gt;
 &lt;br /&gt;
 int main(int argc, char** argv)&lt;br /&gt;
 {&lt;br /&gt;
    FILE* fdl;&lt;br /&gt;
    size_t licenseSize;&lt;br /&gt;
    char* licenseData;&lt;br /&gt;
    char* licenseDataOrg;&lt;br /&gt;
   &lt;br /&gt;
    int status;&lt;br /&gt;
    int i;&lt;br /&gt;
   &lt;br /&gt;
    if (argc &amp;lt; 3)&lt;br /&gt;
    { &lt;br /&gt;
       fprintf(stderr, &amp;quot;Usage: %s [license] [File1] [File2] ... [FileN]\n&amp;quot;,&lt;br /&gt;
               argv[0]);&lt;br /&gt;
       return EXIT_FAILURE;&lt;br /&gt;
    }&lt;br /&gt;
   &lt;br /&gt;
    // Load the license file &lt;br /&gt;
    fdl = fopen(argv[1], &amp;quot;r&amp;quot;);&lt;br /&gt;
    if (fdl == 0)&lt;br /&gt;
    {&lt;br /&gt;
       fprintf(stderr, &amp;quot;Unable to open license file '%s': %s\n&amp;quot;, &lt;br /&gt;
               argv[1], strerror(errno));&lt;br /&gt;
       return EXIT_FAILURE;&lt;br /&gt;
    }&lt;br /&gt;
    fseek(fdl, 0, SEEK_END); // I should check the return code &lt;br /&gt;
    licenseSize = ftell(fdl); // I should check the return code &lt;br /&gt;
    rewind(fdl); // I should check the return code &lt;br /&gt;
    licenseDataOrg = licenseData = malloc(licenseSize + 1);&lt;br /&gt;
    if (licenseData == 0)&lt;br /&gt;
    {&lt;br /&gt;
       fclose(fdl);&lt;br /&gt;
       fprintf(stderr, &amp;quot;Unable to allocate memory\n&amp;quot;);&lt;br /&gt;
       return EXIT_FAILURE;&lt;br /&gt;
    }&lt;br /&gt;
    status = fread(licenseData, 1, licenseSize, fdl);&lt;br /&gt;
    if (status != licenseSize)&lt;br /&gt;
    {&lt;br /&gt;
       free(licenseData);&lt;br /&gt;
       fclose(fdl);&lt;br /&gt;
       fprintf(stderr, &amp;quot;Unable to load in memory license file\n&amp;quot;);&lt;br /&gt;
       return EXIT_FAILURE;&lt;br /&gt;
    }&lt;br /&gt;
    fclose(fdl);&lt;br /&gt;
    licenseData[licenseSize] = '\0';&lt;br /&gt;
    // Trim the licenseData &lt;br /&gt;
    while(isspace(*licenseData))&lt;br /&gt;
    {&lt;br /&gt;
       ++licenseData;&lt;br /&gt;
    }&lt;br /&gt;
    while(isspace(licenseData[licenseSize -1]))&lt;br /&gt;
    {&lt;br /&gt;
       licenseData[licenseSize -1] = '\0';&lt;br /&gt;
       --licenseSize;&lt;br /&gt;
    } &lt;br /&gt;
    printf(&amp;quot;License:\n[%s]\n&amp;quot;, licenseData);&lt;br /&gt;
    printf(&amp;quot;Updating %d files\n&amp;quot;, argc - 2);&lt;br /&gt;
    for(i = 2 ; i &amp;lt; argc ; ++i)&lt;br /&gt;
    {&lt;br /&gt;
       // Rename the file &lt;br /&gt;
       char bakFileName[PATH_MAX];&lt;br /&gt;
       FILE* source;&lt;br /&gt;
       FILE* dest;&lt;br /&gt;
       int state;&lt;br /&gt;
       int data;&lt;br /&gt;
       snprintf(bakFileName, PATH_MAX, &amp;quot;%s.bak&amp;quot;, argv[i]);&lt;br /&gt;
       status = rename(argv[i], bakFileName);&lt;br /&gt;
       if (status != 0)&lt;br /&gt;
       {&lt;br /&gt;
          fprintf(stderr, &amp;quot;%s: skipped (rename file '%s' to '%s' failed: %s)\n&amp;quot;,&lt;br /&gt;
                  argv[i], argv[i], bakFileName, strerror(errno));&lt;br /&gt;
          continue;&lt;br /&gt;
       }&lt;br /&gt;
       source = fopen(bakFileName, &amp;quot;r&amp;quot;);&lt;br /&gt;
       if (source == 0)&lt;br /&gt;
       {&lt;br /&gt;
          fprintf(stderr, &amp;quot;%s: skipped (opening of '%s' failed: %s)\n&amp;quot;, &lt;br /&gt;
                  argv[i], bakFileName, strerror(errno));&lt;br /&gt;
          continue;&lt;br /&gt;
       }&lt;br /&gt;
       dest = fopen(argv[i], &amp;quot;w&amp;quot;);&lt;br /&gt;
       if (dest == 0)&lt;br /&gt;
       {&lt;br /&gt;
          fprintf(stderr, &amp;quot;%s: skipped (opening of '%s' failed: %s\n&amp;quot;, &lt;br /&gt;
                  argv[i], argv[i], strerror(errno));&lt;br /&gt;
          fclose(source);&lt;br /&gt;
          continue;&lt;br /&gt;
       }&lt;br /&gt;
       // Start the copy&lt;br /&gt;
       state = 0;&lt;br /&gt;
       while((data = fgetc(source)) != EOF)&lt;br /&gt;
       {&lt;br /&gt;
          switch(state)&lt;br /&gt;
          {&lt;br /&gt;
             case 0: // Before anything &lt;br /&gt;
                if (data == '*')&lt;br /&gt;
                   state = 1;&lt;br /&gt;
                else &lt;br /&gt;
                   fputc(data, dest);&lt;br /&gt;
                break;&lt;br /&gt;
                // On a lu une etoile, est ce la fin du premier commentaire ?  &lt;br /&gt;
             case 1: &lt;br /&gt;
                if (data == '/')&lt;br /&gt;
                {&lt;br /&gt;
                   state = 2; // Goto skip license &lt;br /&gt;
                   fputc('*', dest);&lt;br /&gt;
                   fputc('/', dest);&lt;br /&gt;
                   fputc('\n', dest);&lt;br /&gt;
                   fwrite(licenseData, 1, licenseSize, dest);&lt;br /&gt;
                }&lt;br /&gt;
                else if (data == '*')&lt;br /&gt;
                {&lt;br /&gt;
                   fputc('*', dest);&lt;br /&gt;
                }&lt;br /&gt;
                else &lt;br /&gt;
                {&lt;br /&gt;
                   state = 0;&lt;br /&gt;
                   fputc(data, dest);&lt;br /&gt;
                }&lt;br /&gt;
                break;&lt;br /&gt;
                // Virer le second commentaire: la license &lt;br /&gt;
             case 2: // skip license&lt;br /&gt;
                if (data == '*')&lt;br /&gt;
                   state = 3; &lt;br /&gt;
                break;&lt;br /&gt;
             case 3:&lt;br /&gt;
                if (data == '/')&lt;br /&gt;
                   state = 4; // Goto Raw copy &lt;br /&gt;
                else if (data == '*')&lt;br /&gt;
                   state = 3;&lt;br /&gt;
                else &lt;br /&gt;
                   state = 2;&lt;br /&gt;
                break;&lt;br /&gt;
                // Raw copy &lt;br /&gt;
             case 4:&lt;br /&gt;
                fputc(data, dest);&lt;br /&gt;
                break;&lt;br /&gt;
          }&lt;br /&gt;
       }&lt;br /&gt;
       fclose(dest);&lt;br /&gt;
       fclose(source);&lt;br /&gt;
       if (state != 4)&lt;br /&gt;
       {&lt;br /&gt;
          printf(&amp;quot;%s: failed\n&amp;quot;, argv[i]);&lt;br /&gt;
       }&lt;br /&gt;
       else &lt;br /&gt;
       {&lt;br /&gt;
          printf(&amp;quot;%s:  updated\n&amp;quot;, argv[i]);&lt;br /&gt;
       }&lt;br /&gt;
    }&lt;br /&gt;
    free(licenseDataOrg);&lt;br /&gt;
    return EXIT_SUCCESS;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== License header ==&lt;br /&gt;
'''cegui_mit.txt'''&lt;br /&gt;
 /***************************************************************************&lt;br /&gt;
 *   Copyright (C) 2004 - 2006 Paul D Turner &amp;amp; The CEGUI Development Team&lt;br /&gt;
 *&lt;br /&gt;
 *   Permission is hereby granted, free of charge, to any person obtaining&lt;br /&gt;
 *   a copy of this software and associated documentation files (the&lt;br /&gt;
 *   &amp;quot;Software&amp;quot;), to deal in the Software without restriction, including&lt;br /&gt;
 *   without limitation the rights to use, copy, modify, merge, publish,&lt;br /&gt;
 *   distribute, sublicense, and/or sell copies of the Software, and to&lt;br /&gt;
 *   permit persons to whom the Software is furnished to do so, subject to&lt;br /&gt;
 *   the following conditions:&lt;br /&gt;
 *&lt;br /&gt;
 *   The above copyright notice and this permission notice shall be&lt;br /&gt;
 *   included in all copies or substantial portions of the Software.&lt;br /&gt;
 *&lt;br /&gt;
 *   THE SOFTWARE IS PROVIDED &amp;quot;AS IS&amp;quot;, WITHOUT WARRANTY OF ANY KIND,&lt;br /&gt;
 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF&lt;br /&gt;
 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.&lt;br /&gt;
 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR&lt;br /&gt;
 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,&lt;br /&gt;
 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR&lt;br /&gt;
 *   OTHER DEALINGS IN THE SOFTWARE.&lt;br /&gt;
 ***************************************************************************/&lt;/div&gt;</summary>
		<author><name>Dalfy</name></author>	</entry>

	</feed>