From 66e147a96d79e0cf97358275802fe39c43328be0 Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Wed, 16 Apr 2003 04:49:01 +0000
Subject: [PATCH] Add code to treat the @verbatiminclude case. Not sure if my
 perl understanting is good enough to do this safely, but it seems to work...

---
 doc/texinfo/texi2html | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/doc/texinfo/texi2html b/doc/texinfo/texi2html
index 67d798d8ae..53b0f97871 100644
--- a/doc/texinfo/texi2html
+++ b/doc/texinfo/texi2html
@@ -5,6 +5,8 @@
 #
 # texi2html: Program to transform Texinfo documents to HTML
 #
+# modified for Gmsh -- see 'gmsh' tags
+#
 #    Copyright (C) 1999, 2000  Free Software Foundation, Inc.
 #
 #    This program is free software; you can redistribute it and/or modify
@@ -36,7 +38,7 @@ require 5.0;
 #--##############################################################################
 
 # CVS version:
-# $Id: texi2html,v 1.2 2003-04-11 23:35:57 geuzaine Exp $
+# $Id: texi2html,v 1.3 2003-04-16 04:49:01 geuzaine Exp $
 
 # Homepage:
 $T2H_HOMEPAGE = <<EOT;
@@ -92,7 +94,7 @@ eval { ($T2H_USER = (getpwuid ($<))[6]) =~ s/,.*//;}; # Who am i
 # Copy this file and make changes to it, if you like.
 # Afterwards, either, load it with command-line option -init_file <your_init_file>
 #
-# $Id: texi2html,v 1.2 2003-04-11 23:35:57 geuzaine Exp $
+# $Id: texi2html,v 1.3 2003-04-16 04:49:01 geuzaine Exp $
 
 ######################################################################
 # stuff which can also be set by command-line options
@@ -1517,7 +1519,7 @@ package Getopt::MySimple;
 
 # --------------------------------------------------------------------------
 # Locally modified by obachman (Display type instead of env, order by cmp)
-# $Id: texi2html,v 1.2 2003-04-11 23:35:57 geuzaine Exp $
+# $Id: texi2html,v 1.3 2003-04-16 04:49:01 geuzaine Exp $
 
 # use strict;
 # no strict 'refs';
@@ -3216,6 +3218,23 @@ INPUT_LINE: while ($_ = &next_line) {
 		warn "$ERROR Bad include line: $_";
 	    }
 	    next;
+	} elsif ($tag eq 'verbatiminclude') { # Added for Gmsh
+	    if (/^\@verbatiminclude\s+($FILERE)\s*$/o) {
+                local($myline);
+		$file = LocateIncludeFile($1);
+		if ($file && -e $file) {
+		    print "verbatim including $file\n";
+                    push @lines, "<PRE>\n";
+                    open file;
+                    push @lines, <file>;
+                    push @lines, "</PRE>\n";
+		} else {
+		    warn "$ERROR Can't find $1, skipping";
+		}
+	    } else {
+		warn "$ERROR Bad verbatiminclude line: $_";
+	    }
+	    next;
 	} elsif ($tag eq 'ifclear') {
 	    if (/^\@ifclear\s+($VARRE)\s*$/o) {
 		next unless defined($value{$1});
-- 
GitLab