Package: enscript
Version: 1.6.4-11
Severity: normal
Tags: patch

Highlighting of .idl-file fails if .idl contains preprocessing
directives (#ifdef, #include etc.)

For example:

./exam.idl:

#include "other-module.idl"
module M {
}

$ enscript -v -E -whtml -p result.html ./exam.idl
AFM: scanning path...
AFM: reading font map "/usr/share/enscript/afm/font.map"
passing through all input files for output language `html'
states: autoloading `lang_html' from `/usr/share/enscript/hl/lang_html.st'
states: autoloading `style_emacs' from
`/usr/share/enscript/hl/style_emacs.st'
states: autoloading `default_faces' from
`/usr/share/enscript/hl/default_faces.st'
states: autoloading `idl' from `/usr/share/enscript/hl/idl.st'
states: autoloading `c_ppline' from `/usr/share/enscript/hl/c_ppline.st'
states: undefined super state `CHighlight'
output left in result.html

The problem is that c_ppline state used from idl state depends on c.st
for special state CHighlight (declared in c.st) but does not fulfil this
dependency by explicit require_state ensure does not ensured in
c_ppline.st itself.
(Which is obviously because all other c_ppline usages occurs inside
c-related states).



Patch to fix unresolved implicit dependency of c_ppline.st state on c.st:

$ diff -u hl/c_ppline.st.old hl/c_ppline.st
--- hl/c_ppline.st.old  2007-09-19 16:16:22.000000000 +0400
+++ hl/c_ppline.st      2007-09-19 16:17:57.000000000 +0400
@@ -3,6 +3,8 @@
  * Objective-C highlighting rules.
  */

+require_state (c);
+
 state c_ppline extends CHighlight
 {
   BEGIN {






--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to