↑↑ Home ↑ UNIX

Patches page

Crap-Clone -- Net::SMTP::TLS -- Samba client -- Nethack Falconseye -- Gnuplot

Relative path support for Crap-Clone

Crap-clone is a CVS to git repository converter. It is the best of the bunch in my limited experience; but even it has some unnecessary drawbacks. A major flaw is that it requires an absolute path to a local CVS repository (and this local mode is its mose efficient). I wrote a small patch and have submitted it to the developer, but I have received no response. So here it is: as a patch file or as a git bundle.

Bugfixes for the Perl module Net::SMTP::TLS

The currently unmaintained Perl module Net::SMTP::TLS suffers from a few small bugs, as can be seen on its CPAN page. This patch combines the bug fixes submitted to CPAN. It adds a debug option, makes functions return 1 on success, corrects the printf format and the loop for sending data. Also included is the patch by ANDREMAR which makes its behaviour at least partly compatible to Net::SMTP. You can also download the complete module.

Samba client recursion

The client program of the Samba project, smbclient, allows to download and upload directories recursively. However, the recursive or non-recursive status can only be toggled, not set to a defined state, and cannot be determined except by counting the number of toggling commands since the program startup. The same goes for some other boolean switches. This patch modifies the semantics of the toggling commands, to allow both setting and querying. It has been submitted as bug #5028, but since it has wishlist severity, it may spend some time in the queue yet. See there for a more detailed description of the changes.

Nethack Falconseye messages

This patch makes the role-playing game Nethack Falconseye (see here) print out its messages to the terminal window too, which helps post-mortem analysis no end.

LaTeX log scale labels for gnuplot

gnuplot is a script-controlled plot program. Despite its name it is not under GNU licence (just one of those coinicidences...), but it is allowed to patch it for one's own use.

One thing which I have always found problematic in gnuplot is labelling logarithmic axes so they look nice in TeX. For an axis extending from 1 to 106, for instance, one would like the labels 1, 10, 100, 103, 104, and so on. Though the gnuplot terminals (= output formats) pstex, pslatex and epslatex allow TeX code in labels, this is not easy.

I have just solved this problem for the second time. The first solution I found years ago involved setting the labels manually with the set x/ytics command. This caused the problem that minor tics were disabled when major tic labels were given in this way. This patch for gnuplot 3.7.1 (and perhaps other 3.* versions?) changes that. You have to give the tic labels in ascending or descending order for it to work.

Recently I hit the same problem again in version 4.2 of gnuplot. It is different enough to make porting the old patch a nuisance. Instead, I found a different and better solution: gnuplot allows to give a printf format for printing the labels. With this patch, numbers in exponential notation are automatically converted into TeX notation if you give a dollar sign after the percent sign initiating the format directive. As superscript exponents can only be typeset in TeX's math mode, you also have to enclose the whole number in dollar signs. So by saying "set format "$%$ g$", you will obtain labels like 1, 100, 0.01 for numbers close to 1 and like $10^{-6}$ (⇒ 10-6) and $3.514\cdot10^{15}$ (⇒ 3.514⋅1015) for numbers with larger exponents.

The $ after the % is allowed with all format directives, but will have an effect only for %e and %g. As an aside, the patch also contains a rough but useful estimation of the width of a TeX source string. Otherwise gnuplot just takes the string length, which is wildly wrong for control sequences and can cause the plot to be shifted spuriously to the right.

TOS / Impressum