From MAILER-DAEMON Wed Mar 02 14:50:03 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Pus3f-0003Fx-MT
	for mharc-help-source-highlight@gnu.org; Wed, 02 Mar 2011 14:50:03 -0500
Received: from [140.186.70.92] (port=42666 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Pus3c-0003Fi-NI
	for help-source-highlight@gnu.org; Wed, 02 Mar 2011 14:50:02 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <yamato@redhat.com>) id 1Pus3a-0000hV-If
	for help-source-highlight@gnu.org; Wed, 02 Mar 2011 14:50:00 -0500
Received: from mx1.redhat.com ([209.132.183.28]:33861)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <yamato@redhat.com>) id 1Pus3Z-0000hE-TW
	for help-source-highlight@gnu.org; Wed, 02 Mar 2011 14:49:58 -0500
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p22Jnt4h002102
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
	for <help-source-highlight@gnu.org>; Wed, 2 Mar 2011 14:49:56 -0500
Received: from localhost (vpn2-9-102.sin2.redhat.com [10.67.9.102])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p22JnrMm019558
	for <help-source-highlight@gnu.org>; Wed, 2 Mar 2011 14:49:54 -0500
Date: Thu, 03 Mar 2011 04:49:52 +0900 (JST)
Message-Id: <20110303.044952.913335889866294442.yamato@redhat.com>
To: help-source-highlight@gnu.org
From: Masatake YAMATO <yamato@redhat.com>
Organization: Red Hat Japan, Inc.
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Subject: [Help-source-highlight] Embedding inputlang as information
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 02 Mar 2011 19:50:02 -0000

Hi,

I'd like you to review my patch. 
The patch embeds input lang used in highlighting into the output xhtml
file.

Background
-----------
I'm developing web based source code viewer using source highlight.

With javascript I'd like to provide some interactive commands working
on the generated html file. The behavior of commands will be changed
according to the ``input lang'' of the original source code.

e.g.:

JUMP command works on

     #include <bar.h> 

in C,

     import foo.bar.Class;

in Java, and

     import foo.bar.Class

in python...


If source highlight embeds the name of input lang to the converted html file, 
I don't have to write lang detector in javascript.  Adding this feature is a
bit private request but similar type of software may want such
input lang(file type) information. So I submitted the patch here.


I don't know how I have to be careful about API and ABI compatibility.
In the patch I may do something bad about the compatibility.


Masatake YAMATO


diff --git a/lib/srchilite/docgenerator.cc b/lib/srchilite/docgenerator.cc
index 1e1ae73..6494e6f 100644
--- a/lib/srchilite/docgenerator.cc
+++ b/lib/srchilite/docgenerator.cc
@@ -31,6 +31,7 @@ void
 DocGenerator::generate_start_doc(std::ostream *sout)
 {
     bool docTitle = (title.size () > 0);
+    bool docInputLang = (input_lang.size () > 0);
     bool inputFileName = (input_file_name.size () > 0);
 
     *sout <<
@@ -42,7 +43,8 @@ DocGenerator::generate_start_doc(std::ostream *sout)
             "\nby Lorenzo Bettini\nhttp://www.lorenzobettini.it\nhttp://www.gnu.org/software/src-highlite",
             doc_header,
             doc_footer,
-            doc_background
+            doc_background,
+	    docInputLang ? input_lang: "unknown"
         );
 }
 
@@ -56,7 +58,8 @@ DocGenerator::generate_end_doc(std::ostream *sout)
             "\nby Lorenzo Bettini\nhttp://www.lorenzobettini.it\nhttp://www.gnu.org/software/src-highlite",
             doc_header,
             doc_footer,
-            doc_background
+            doc_background,
+	    ""
         );
 }
 
diff --git a/lib/srchilite/docgenerator.h b/lib/srchilite/docgenerator.h
index 16a2804..3a6282d 100644
--- a/lib/srchilite/docgenerator.h
+++ b/lib/srchilite/docgenerator.h
@@ -47,16 +47,18 @@ protected:
     string css_url;
     string doc_background;
     bool entire_doc;
+    string input_lang;
 
     DocTemplate docTemplate;
 
 public:
     DocGenerator(const string &s, const string &i, const string &h,
-            const string &f, const string &c, const string &back, bool entire,
+            const string &f, const string &c, const string &back, bool entire, 
+	    const string &l,
             const string &start_tmpl, const string &end_tmpl) :
         title(s), gen_source_highlight_version(true), input_file_name(i),
                 doc_header(h), doc_footer(f), css_url(c), doc_background(back),
-                entire_doc(entire), docTemplate(DocTemplate(start_tmpl,
+	  entire_doc(entire), input_lang(l), docTemplate(DocTemplate(start_tmpl,
                         end_tmpl)) {
     }
     DocGenerator(const string &start_tmpl, const string &end_tmpl) :
@@ -97,6 +99,10 @@ public:
         title = _title;
     }
 
+    void setInputLang(const std::string &_input_lang) {
+      input_lang = _input_lang;
+    }
+
     void setBackgroundColor(const std::string &bg) {
         doc_background = bg;
     }
diff --git a/lib/srchilite/doctemplate.cpp b/lib/srchilite/doctemplate.cpp
index 32b4e2f..63309c5 100644
--- a/lib/srchilite/doctemplate.cpp
+++ b/lib/srchilite/doctemplate.cpp
@@ -14,12 +14,14 @@
 namespace srchilite {
 
 #define TITLE_VAR_TEXT "$title" // the text of the title variable
+#define INPUT_LANG_VAR_TEXT "$inputlang" // the text of the input lang variable
 #define CSS_VAR_TEXT "$css" // the text of the css variable
 #define ADDITIONAL_VAR_TEXT "$additional" // the text of the additional text variable
 #define HEADER_VAR_TEXT "$header" // the text of the header variable
 #define FOOTER_VAR_TEXT "$footer" // the text of the footer variable
 #define BACKGROUND_VAR_TEXT "$docbgcolor" // the text of the background variable
 #define TITLE_VAR "\\" TITLE_VAR_TEXT // the name of the title variable as regexp
+#define INPUT_LANG_VAR "\\" INPUT_LANG_VAR_TEXT // the name of the input lang variable as regexp
 #define CSS_VAR "\\" CSS_VAR_TEXT // the name of the css variable as regexp
 #define ADDITIONAL_VAR "\\" ADDITIONAL_VAR_TEXT // the text of the additional text variable as regexp
 #define HEADER_VAR "\\" HEADER_VAR_TEXT // the text of the header variable as regexp
@@ -35,7 +37,8 @@ DocTemplate::DocTemplate(const string &begin, const string &end) :
 
 string
 DocTemplate::output_begin(const string &title, const string &cs, const string &add,
-    const string &header, const string &footer, const std::string &background)
+    const string &header, const string &footer, const std::string &background,
+    const string &input_lang)
 {
     boost::regex title_exp(TITLE_VAR);
     boost::regex css_exp(CSS_VAR);
@@ -43,6 +46,7 @@ DocTemplate::output_begin(const string &title, const string &cs, const string &a
     boost::regex header_exp(HEADER_VAR);
     boost::regex footer_exp(FOOTER_VAR);
     boost::regex background_exp(BACKGROUND_VAR);
+    boost::regex input_lang_exp(INPUT_LANG_VAR);
 
     string ret = subst(title_exp, begin_repr, title);
     ret = subst(css_exp, ret, cs);
@@ -50,13 +54,15 @@ DocTemplate::output_begin(const string &title, const string &cs, const string &a
     ret = subst(header_exp, ret, header);
     ret = subst(footer_exp, ret, footer);
     ret = subst(background_exp, ret, background);
+    ret = subst(input_lang_exp, ret, input_lang);
 
     return ret;
 }
 
 string
 DocTemplate::output_end(const string &title, const string &cs, const string &add,
-    const string &header, const string &footer, const std::string &background)
+    const string &header, const string &footer, const std::string &background, 
+    const string &input_lang)
 {
     boost::regex title_exp(TITLE_VAR);
     boost::regex css_exp(CSS_VAR);
@@ -64,6 +70,7 @@ DocTemplate::output_end(const string &title, const string &cs, const string &add
     boost::regex header_exp(HEADER_VAR);
     boost::regex footer_exp(FOOTER_VAR);
     boost::regex background_exp(BACKGROUND_VAR);
+    boost::regex input_lang_exp(INPUT_LANG_VAR);
 
     string ret = subst(title_exp, end_repr, title);
     ret = subst(css_exp, ret, cs);
@@ -71,6 +78,7 @@ DocTemplate::output_end(const string &title, const string &cs, const string &add
     ret = subst(header_exp, ret, header);
     ret = subst(footer_exp, ret, footer);
     ret = subst(background_exp, ret, background);
+    ret = subst(input_lang_exp, ret, input_lang);
 
     return ret;
 }
diff --git a/lib/srchilite/doctemplate.h b/lib/srchilite/doctemplate.h
index 7ee0e1a..17340e6 100644
--- a/lib/srchilite/doctemplate.h
+++ b/lib/srchilite/doctemplate.h
@@ -22,10 +22,12 @@ public:
 
     std::string output_begin(const std::string &title, const std::string &cs,
             const std::string &add, const std::string &header,
-            const std::string &footer, const std::string &background);
+            const std::string &footer, const std::string &background,
+	    const std::string &input_lang);
     std::string output_end(const std::string &title, const std::string &cs,
             const std::string &add, const std::string &header,
-            const std::string &footer, const std::string &background);
+            const std::string &footer, const std::string &background,
+	    const std::string &input_lang);
 
     const std::string &toStringBegin() const {
         return begin_repr;
diff --git a/lib/srchilite/sourcehighlight.cpp b/lib/srchilite/sourcehighlight.cpp
index 9c0a55b..3abaed7 100644
--- a/lib/srchilite/sourcehighlight.cpp
+++ b/lib/srchilite/sourcehighlight.cpp
@@ -257,6 +257,9 @@ void SourceHighlight::highlight(const std::string &input,
         noDocGenerator->setTitle(input);
     }
 
+    docGenerator->setInputLang(inputLang);
+    noDocGenerator->setInputLang(inputLang);      
+
     if (ctagsFormatter) {
         // if we need to generate references, then set the file info
         ctagsFormatter->setFileInfo(input, output);
@@ -334,6 +337,8 @@ void SourceHighlight::highlight(std::istream &input, std::ostream &output,
         documentGenerator->setTitle(title);
     }
 
+    documentGenerator->setInputLang(inputLang);
+
     // first generate the start of the output file
     documentGenerator->generate_start_doc(&output);
 
diff --git a/lib/srchilite/sourcehighlight.h b/lib/srchilite/sourcehighlight.h
index 7d61972..4cef31e 100644
--- a/lib/srchilite/sourcehighlight.h
+++ b/lib/srchilite/sourcehighlight.h
@@ -64,6 +64,9 @@ class SourceHighlight {
     /// the title for the output document (defaults to the source file name)
     std::string title;
 
+    /// the input lang for the output document
+    std::string inputLang;
+
     /// the value for the css
     std::string css;
 
@@ -272,6 +275,10 @@ public:
     void setTitle(const std::string &_title) {
         title = _title;
     }
+    
+    void setInputLang(const std::string &_inputLang) {
+        inputLang = _inputLang;
+    }
 
     void setCss(const std::string &_css) {
         css = _css;
diff --git a/lib/tests/test_outlangparser_main.cpp b/lib/tests/test_outlangparser_main.cpp
index 467604b..d7f51cf 100644
--- a/lib/tests/test_outlangparser_main.cpp
+++ b/lib/tests/test_outlangparser_main.cpp
@@ -45,7 +45,7 @@ this is simply the footer: $footer",
             textstyles->docTemplate.toStringEnd());
 
     string start = textstyles->docTemplate.output_begin("title", "css",
-            "additional", "header", "footer", "");
+            "additional", "header", "footer", "", "INPUTLANG");
     cout << "DocTemplate start:\n" << start << endl;
 
     assertEquals(
@@ -59,7 +59,7 @@ and this is some additional stuff: additional",
             start);
 
     string end = textstyles->docTemplate.output_end("title", "css",
-            "additional", "header", "footer", "");
+            "additional", "header", "footer", "", "INPUTLANG");
     cout << "DocTemplate end:\n" << end << endl;
 
     assertEquals(
diff --git a/lib/tests/test_textgenerator_main.cpp b/lib/tests/test_textgenerator_main.cpp
index aeaef3b..ed58660 100644
--- a/lib/tests/test_textgenerator_main.cpp
+++ b/lib/tests/test_textgenerator_main.cpp
@@ -74,9 +74,9 @@ int main() {
     DocTemplate docTemplate(start, end);
 
     string transformed_start = docTemplate.output_begin("TITLE", "CSS",
-            "ADDITIONAL", "HEADER\n", "\nFOOTER", "");
+            "ADDITIONAL", "HEADER\n", "\nFOOTER", "", "INPUTLANG");
     string transformed_end = docTemplate.output_end("TITLE", "CSS",
-            "ADDITIONAL", "HEADER\n", "\nFOOTER", "");
+            "ADDITIONAL", "HEADER\n", "\nFOOTER", "", "INPUTLANG");
 
     cout << "orig start : " << start << endl;
     cout << "transformed: " << transformed_start << endl;
diff --git a/src/xhtml.outlang b/src/xhtml.outlang
index ecc1a27..cd5d02c 100644
--- a/src/xhtml.outlang
+++ b/src/xhtml.outlang
@@ -7,6 +7,7 @@ doctemplate
 <head>
 <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />
 <meta name=\"GENERATOR\" content=\"$additional\" />
+<meta name=\"INPUTLANG\" content=\"$inputlang\" />
 <title>$title</title>
 </head>
 <body style=\"background-color: $docbgcolor\">
diff --git a/src/xhtmlcss.outlang b/src/xhtmlcss.outlang
index 215800f..1b1387f 100644
--- a/src/xhtmlcss.outlang
+++ b/src/xhtmlcss.outlang
@@ -7,6 +7,7 @@ doctemplate
 <head>
 <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />
 <meta name=\"GENERATOR\" content=\"$additional\" />
+<meta name=\"INPUTLANG\" content=\"$inputlang\" />
 <title>$title</title>
 <link rel=\"stylesheet\" href=\"$css\" type=\"text/css\" />
 </head>


From MAILER-DAEMON Mon Mar 07 13:19:12 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Pwf1U-0007Fv-IE
	for mharc-help-source-highlight@gnu.org; Mon, 07 Mar 2011 13:19:12 -0500
Received: from [140.186.70.92] (port=57645 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Pwf1R-0007Fe-UC
	for help-source-highlight@gnu.org; Mon, 07 Mar 2011 13:19:11 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1Pwf1Q-0006d8-6G
	for help-source-highlight@gnu.org; Mon, 07 Mar 2011 13:19:09 -0500
Received: from pianeta.di.unito.it ([130.192.156.1]:62478)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1Pwf1P-0006cv-LF
	for help-source-highlight@gnu.org; Mon, 07 Mar 2011 13:19:08 -0500
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-5.541, required 3,
	AWL -3.04, BAYES_00 -2.60, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: p27IIond010017
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id p27IIond010017
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ) for <help-source-highlight@gnu.org>;
	Mon, 7 Mar 2011 19:18:53 +0100 (CET)
Message-ID: <4D75218A.8060702@dsi.unifi.it>
Date: Mon, 07 Mar 2011 19:18:50 +0100
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8
MIME-Version: 1.0
To: discussion list for source-highlight <help-source-highlight@gnu.org>
Subject: Re: [Help-source-highlight] Embedding inputlang as information
References: <20110303.044952.913335889866294442.yamato@redhat.com>
In-Reply-To: <20110303.044952.913335889866294442.yamato@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 07 Mar 2011 18:19:11 -0000

On 03/02/2011 08:49 PM, Masatake YAMATO wrote:
> Hi,
>
> I'd like you to review my patch.
> The patch embeds input lang used in highlighting into the output xhtml
> file.

Hi there

thanks for the interesting patch! :)

I'll check it; as for now, I can say that I can modify it in order not 
to break abi compatibility (e.g., the input lang additional parameter 
can be set with a set method so not to change the method/constructor 
signature for instance).

cheers
	Lorenzo

-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Wed Mar 30 10:52:12 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q4wkm-0004Mo-7B
	for mharc-help-source-highlight@gnu.org; Wed, 30 Mar 2011 10:52:12 -0400
Received: from [140.186.70.92] (port=50849 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q4wke-0003rD-0N
	for help-source-highlight@gnu.org; Wed, 30 Mar 2011 10:52:10 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <yamato@redhat.com>) id 1Q4wka-0004c4-84
	for help-source-highlight@gnu.org; Wed, 30 Mar 2011 10:52:01 -0400
Received: from mx1.redhat.com ([209.132.183.28]:55322)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <yamato@redhat.com>) id 1Q4wkZ-0004bj-TQ
	for help-source-highlight@gnu.org; Wed, 30 Mar 2011 10:52:00 -0400
Received: from int-mx12.intmail.prod.int.phx2.redhat.com
	(int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2UEpmfX006256
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 30 Mar 2011 10:51:48 -0400
Received: from localhost (beach.nrt.redhat.com [10.64.200.71])
	by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP
	id p2UEpk6T021300; Wed, 30 Mar 2011 10:51:47 -0400
Date: Wed, 30 Mar 2011 23:51:45 +0900 (JST)
Message-Id: <20110330.235145.1046066719585364096.yamato@redhat.com>
To: help-source-highlight@gnu.org, bettini@dsi.unifi.it
Subject: Re: [Help-source-highlight] Embedding inputlang as information
From: Masatake YAMATO <yamato@redhat.com>
In-Reply-To: <4D75218A.8060702@dsi.unifi.it>
References: <20110303.044952.913335889866294442.yamato@redhat.com>
	<4D75218A.8060702@dsi.unifi.it>
Organization: Red Hat Japan, Inc.
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: 
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 30 Mar 2011 14:52:10 -0000

Hi,

Any progress about reviewing?
I need the input lang information in my web application:).

Masatake YAMATO

> On 03/02/2011 08:49 PM, Masatake YAMATO wrote:
>> Hi,
>>
>> I'd like you to review my patch.
>> The patch embeds input lang used in highlighting into the output xhtml
>> file.
> 
> Hi there
> 
> thanks for the interesting patch! :)
> 
> I'll check it; as for now, I can say that I can modify it in order not
> to break abi compatibility (e.g., the input lang additional parameter
> can be set with a set method so not to change the method/constructor
> signature for instance).
> 
> cheers
> 	Lorenzo
> 
> -- 
> Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
> ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
> HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
> http://www.myspace.com/supertrouperabba
> BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
> http://www.gnu.org/software/src-highlite
> http://www.gnu.org/software/gengetopt
> http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
> 
> _______________________________________________
> Help-source-highlight mailing list
> Help-source-highlight@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-source-highlight


From MAILER-DAEMON Wed Mar 30 10:56:10 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q4woc-00060U-G5
	for mharc-help-source-highlight@gnu.org; Wed, 30 Mar 2011 10:56:10 -0400
Received: from [140.186.70.92] (port=46631 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q4woa-000608-B0
	for help-source-highlight@gnu.org; Wed, 30 Mar 2011 10:56:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1Q4woY-0005Vn-E4
	for help-source-highlight@gnu.org; Wed, 30 Mar 2011 10:56:07 -0400
Received: from pianeta.di.unito.it ([130.192.156.1]:44328)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bettini@dsi.unifi.it>) id 1Q4woY-0005VN-5W
	for help-source-highlight@gnu.org; Wed, 30 Mar 2011 10:56:06 -0400
X-MailScanner-From: bettini@dsi.unifi.it
X-SpamCheck: not spam, SpamAssassin (not cached, score=-5.048, required 3,
	AWL -2.55, BAYES_00 -2.60, RDNS_NONE 0.10)
X-AntiVirus: Email Clean
X-dipinfo-MailScanner-ID: p2UEtc3d022682
X-dipinfo-MailScanner-Information: Please contact Department of Computer
	Science technical staff for more information
Received: from pianeta.di.unito.it ([130.192.156.1])
	by pianeta.di.unito.it (INFO-DIP) with ESMTP id p2UEtc3d022682
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO
	AuthenticatedUser=bettini ) for <help-source-highlight@gnu.org>;
	Wed, 30 Mar 2011 16:55:38 +0200 (CEST)
Message-ID: <4D93446A.6050508@dsi.unifi.it>
Date: Wed, 30 Mar 2011 16:55:38 +0200
From: Lorenzo Bettini <bettini@dsi.unifi.it>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8
MIME-Version: 1.0
To: discussion list for source-highlight <help-source-highlight@gnu.org>
Subject: Re: [Help-source-highlight] Embedding inputlang as information
References: <20110303.044952.913335889866294442.yamato@redhat.com>	<4D75218A.8060702@dsi.unifi.it>
	<20110330.235145.1046066719585364096.yamato@redhat.com>
In-Reply-To: <20110330.235145.1046066719585364096.yamato@redhat.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta)
X-Received-From: 130.192.156.1
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 30 Mar 2011 14:56:09 -0000

Hi there

I still haven't had time to work on this.  However, your patch looks OK. 
  As I said in my previous email I think I will not add that additional 
argument in the constructor, but make it settable in a set method in 
order not to break compatibility, or probably add an overloaded 
constructor with the additional parameter.

In the meantime, could you use your patched version for your web app?

cheers
	Lorenzo

On 03/30/2011 04:51 PM, Masatake YAMATO wrote:
> Hi,
>
> Any progress about reviewing?
> I need the input lang information in my web application:).
>
> Masatake YAMATO
>
>> On 03/02/2011 08:49 PM, Masatake YAMATO wrote:
>>> Hi,
>>>
>>> I'd like you to review my patch.
>>> The patch embeds input lang used in highlighting into the output xhtml
>>> file.
>>
>> Hi there
>>
>> thanks for the interesting patch! :)
>>
>> I'll check it; as for now, I can say that I can modify it in order not
>> to break abi compatibility (e.g., the input lang additional parameter
>> can be set with a set method so not to change the method/constructor
>> signature for instance).
>>
>> cheers
>> 	Lorenzo
>>



-- 
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net


From MAILER-DAEMON Wed Mar 30 20:52:23 2011
Received: from mailman by lists.gnu.org with archive (Exim 4.43)
	id 1Q567b-0001VE-DR
	for mharc-help-source-highlight@gnu.org; Wed, 30 Mar 2011 20:52:23 -0400
Received: from [140.186.70.92] (port=60725 helo=eggs.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.43) id 1Q567Z-0001V9-5e
	for help-source-highlight@gnu.org; Wed, 30 Mar 2011 20:52:22 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <yamato@redhat.com>) id 1Q567X-0006oY-NY
	for help-source-highlight@gnu.org; Wed, 30 Mar 2011 20:52:20 -0400
Received: from mx1.redhat.com ([209.132.183.28]:56452)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <yamato@redhat.com>) id 1Q567X-0006oQ-91
	for help-source-highlight@gnu.org; Wed, 30 Mar 2011 20:52:19 -0400
Received: from int-mx02.intmail.prod.int.phx2.redhat.com
	(int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12])
	by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2V0q8pm017823
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Wed, 30 Mar 2011 20:52:08 -0400
Received: from localhost (beach.nrt.redhat.com [10.64.200.71])
	by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP
	id p2V0q6FZ004132; Wed, 30 Mar 2011 20:52:07 -0400
Date: Thu, 31 Mar 2011 09:52:06 +0900 (JST)
Message-Id: <20110331.095206.831016316776045422.yamato@redhat.com>
To: help-source-highlight@gnu.org, bettini@dsi.unifi.it
Subject: Re: [Help-source-highlight] Embedding inputlang as information
From: Masatake YAMATO <yamato@redhat.com>
In-Reply-To: <4D93446A.6050508@dsi.unifi.it>
References: <4D75218A.8060702@dsi.unifi.it>
	<20110330.235145.1046066719585364096.yamato@redhat.com>
	<4D93446A.6050508@dsi.unifi.it>
Organization: Red Hat Japan, Inc.
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-Received-From: 209.132.183.28
Cc: 
X-BeenThere: help-source-highlight@gnu.org
X-Mailman-Version: 2.1.5
Precedence: list
Reply-To: discussion list for source-highlight <help-source-highlight@gnu.org>
List-Id: discussion list for source-highlight <help-source-highlight.gnu.org>
List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-source-highlight>
List-Post: <mailto:help-source-highlight@gnu.org>
List-Help: <mailto:help-source-highlight-request@gnu.org?subject=help>
List-Subscribe: <http://lists.gnu.org/mailman/listinfo/help-source-highlight>, 
	<mailto:help-source-highlight-request@gnu.org?subject=subscribe>
X-List-Received-Date: Thu, 31 Mar 2011 00:52:22 -0000

Hi,

thank you for replying.

> Hi there
> 
> I still haven't had time to work on this.  However, your patch looks
> OK.  As I said in my previous email I think I will not add that
> additional argument in the constructor, but make it settable in a set
> method in order not to break compatibility, or probably add an
> overloaded constructor with the additional parameter.

Implementing with the overloaded constructor aproach is much easier for 
me. I'll submit the patch.

> In the meantime, could you use your patched version for your web app?

Sure.

Masatake YAMATO

 
> cheers
> 	Lorenzo
> 
> On 03/30/2011 04:51 PM, Masatake YAMATO wrote:
>> Hi,
>>
>> Any progress about reviewing?
>> I need the input lang information in my web application:).
>>
>> Masatake YAMATO
>>
>>> On 03/02/2011 08:49 PM, Masatake YAMATO wrote:
>>>> Hi,
>>>>
>>>> I'd like you to review my patch.
>>>> The patch embeds input lang used in highlighting into the output xhtml
>>>> file.
>>>
>>> Hi there
>>>
>>> thanks for the interesting patch! :)
>>>
>>> I'll check it; as for now, I can say that I can modify it in order not
>>> to break abi compatibility (e.g., the input lang additional parameter
>>> can be set with a set method so not to change the method/constructor
>>> signature for instance).
>>>
>>> cheers
>>> 	Lorenzo
>>>
> 
> 
> 
> -- 
> Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
> ICQ# lbetto, 16080134     (GNU/Linux User # 158233)
> HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
> http://www.myspace.com/supertrouperabba
> BLOGS: http://tronprog.blogspot.com  http://longlivemusic.blogspot.com
> http://www.gnu.org/software/src-highlite
> http://www.gnu.org/software/gengetopt
> http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
> 
> _______________________________________________
> Help-source-highlight mailing list
> Help-source-highlight@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-source-highlight


