fix 2 bugs in toptools
Status: Alpha
Brought to you by:
alexandergeorg
This is a small patch that fix 2 small bugs I found:
a- in top2ps, on my system, basename() would cause a segfault the way it was written. The 1st part of the patch fixes that, while also creating a backup of the pointer to the filename string (necessary when comes the time to free() as basename() can change the pointer, and so when a path was used in the filename it would cause free() to return an error)
b- in top2svg, between the header and the code, the height and width in the header got inverter, this fixes the code to match the order of the header.
patch for top2ps.c and top2svg.c