groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] Postprocessor memory hole


From: Bernd Warken
Subject: [Groff] Postprocessor memory hole
Date: Sat, 29 Sep 2001 13:17:31 +0200

Precedence: fm-user
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

The gtroff intermediate output is the usual input for the
postprocessors.

Function do_file() defined in src/libs/libdriver/intput.cc is the corresponding 
parser.  It translates the intermediate output into a global variable pr 
prototyped in src/include/driver.h .

pr is allocated within input.cc, but not deallocated.  So each postprocessor 
must manually deallocate this variable in its main() function - but grolbp 
doesn't.

1) This could be fixed by adding "delete pr;" to lbp.cc, but a safer way for 
future devices is to make pr local to do_file().  For, apart from being 
deallocated by the devices and initialized in src/libs/libdriver/printer.cc, 
the variable pr seems to be unused outside of do_file().

2) Moreover, the naming of "do_file()" is very weak.  I propose to rename it 
into something like "parse_intermediate()" or simply "postprocess()".

If there aren't any compatibility issues on this I could prepare patches for 
Werner.

Bernd Warken <address@hidden>

_______________________________________________________________________
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
address@hidden, 8MB Speicher, Verschluesselung - http://freemail.web.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]