discuss: Maintaining program listings


Previous by date: 24 Jun 2002 08:51:15 -0000 Maintaining program listings, Pradeep Padala
Next by date: 24 Jun 2002 08:51:15 -0000 HOWTO - Trust Easy Connect 9600 Plus, Jan Keirse
Previous in thread: 24 Jun 2002 08:51:15 -0000 Maintaining program listings, Pradeep Padala
Next in thread: 24 Jun 2002 08:51:15 -0000 Re: Maintaining program listings, Charles Curley

Subject: Re: Maintaining program listings
From: Alexander Bartolich ####@####.####
Date: 24 Jun 2002 08:51:15 -0000
Message-Id: <12356.1024908644@www51.gmx.net>

Pradeep Padala:
> [...] I want to maintain them as seperate .c files
> and include them in my sgml file.
> [...]
> <!ENTITY hello SYSTEM "hello_world.c">

Very bad idea. Entities of this type will be
interpreted as SGML source. The very first

#include <...

will break. Same for 

if (a && b)

or

strtol(&endp, 

The correct way is to include the text file as an "image"
of type linespecific. Preferred way changed through DocBook
versions. AFAIK the modern way is this:

<programlisting><inlinemediaobject><imageobject>
  <imagedata format="linespecific" fileref="odbc/txt/oodbc.txt">
</imageobject></inlinemediaobject></programlisting>

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net


Previous by date: 24 Jun 2002 08:51:15 -0000 Maintaining program listings, Pradeep Padala
Next by date: 24 Jun 2002 08:51:15 -0000 HOWTO - Trust Easy Connect 9600 Plus, Jan Keirse
Previous in thread: 24 Jun 2002 08:51:15 -0000 Maintaining program listings, Pradeep Padala
Next in thread: 24 Jun 2002 08:51:15 -0000 Re: Maintaining program listings, Charles Curley


  ©The Linux Documentation Project, 2014. Listserver maintained by dr Serge Victor on ibiblio.org servers. See current spam statz.