missing snprintf in xdvik
Harald Koenig <[email protected]>
| Newsgroups | gmane.comp.tex.tetex.beta |
|---|---|
| Message-ID | <[email protected]> |
DEC Alpha OSF1 V4.0 doesn't have snprintf in default libs so xdvik/configure
can't find it (it's hidden in /usr/lib/libdb.a).
the following patch fixes a problem when linking xdvik on such systems
without snprintf:
-------------------------------------------------------------------------------
--- tetex-src-beta-2.96.0.20040321/texk/xdvik/gui/xm_prefs2.c.orig Thu Mar 18 00:22:54 2004
+++ tetex-src-beta-2.96.0.20040321/texk/xdvik/gui/xm_prefs2.c Mon Mar 22 17:33:26 2004
@@ -27,6 +27,7 @@
#include "xdvi-config.h"
#include "xdvi.h"
+#include "my-snprintf.h"
#include "x_util.h"
#include "xm_colorsel.h"
@@ -355,7 +356,7 @@
char buf[128];
Widget darkness_button;
darkness_text = XmCreateTextField(darkness_form, "darkness_text", NULL, 0);
- snprintf(buf, 128, "%d", (int)(resource.gamma * 100.0 + 0.5));
+ SNPRINTF(buf, 128, "%d", (int)(resource.gamma * 100.0 + 0.5));
XtVaSetValues(darkness_text,
XmNtopAttachment, XmATTACH_FORM,
XmNleftAttachment, XmATTACH_WIDGET,
-------------------------------------------------------------------------------
Harald Koenig
--
"I hope to die ___ _____
before I *have* to use Microsoft Word.", 0--,| /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen. <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig \/\/\/\/\/\/\/\/\/
science+computing ag // / \\ \
[email protected] ^^^^^ ^^^^^