projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix root cause of bug worked around by previous check-in, and remove
[pspp]
/
src
/
output.c
diff --git
a/src/output.c
b/src/output.c
index 8cf5bafa287ff7ef4bd75b8dee42c2b925224288..6a4ed78dbb9ada555050b262de963b1456e2b892 100644
(file)
--- a/
src/output.c
+++ b/
src/output.c
@@
-18,18
+18,19
@@
02111-1307, USA. */
#include <config.h>
02111-1307, USA. */
#include <config.h>
+#include "output.h"
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include "alloc.h"
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <ctype.h>
#include "alloc.h"
-#include "
approx
.h"
+#include "
devind
.h"
#include "error.h"
#include "filename.h"
#include "error.h"
#include "filename.h"
+#include "htmlP.h"
#include "lexer.h"
#include "misc.h"
#include "lexer.h"
#include "misc.h"
-#include "output.h"
#include "settings.h"
#include "str.h"
#include "settings.h"
#include "str.h"
@@
-194,7
+195,7
@@
expand_name (char *bp, char *ep)
/* Looks for a macro with key KEY, and returns the corresponding value
if found, or NULL if not. */
/* Looks for a macro with key KEY, and returns the corresponding value
if found, or NULL if not. */
-const char *
+
static
const char *
find_defn_value (const char *key)
{
static char buf[INT_DIGITS + 1];
find_defn_value (const char *key)
{
static char buf[INT_DIGITS + 1];
@@
-226,9
+227,8
@@
outp_init (void)
extern struct outp_class postscript_class;
extern struct outp_class epsf_class;
#endif
extern struct outp_class postscript_class;
extern struct outp_class epsf_class;
#endif
-#if !NO_HTML
extern struct outp_class html_class;
extern struct outp_class html_class;
-#endif
+ extern struct outp_class devind_class;
char def[] = "default";
char def[] = "default";
@@
-239,6
+239,7
@@
outp_init (void)
add_class (&epsf_class);
add_class (&postscript_class);
#endif
add_class (&epsf_class);
add_class (&postscript_class);
#endif
+ add_class (&devind_class);
add_class (&ascii_class);
add_name (def, &def[strlen (def)], OUTP_S_INIT_FILE);
add_class (&ascii_class);
add_name (def, &def[strlen (def)], OUTP_S_INIT_FILE);
@@
-287,6
+288,8
@@
outp_read_devices (void)
where.line_number = 0;
err_push_file_locator (&where);
where.line_number = 0;
err_push_file_locator (&where);
+ ds_init (NULL, &line, 128);
+
if (init_fn == NULL)
{
msg (IE, _("Cannot find output initialization file. Use `-vv' to view "
if (init_fn == NULL)
{
msg (IE, _("Cannot find output initialization file. Use `-vv' to view "
@@
-302,7
+305,6
@@
outp_read_devices (void)
goto exit;
}
goto exit;
}
- ds_init (NULL, &line, 128);
for (;;)
{
char *cp;
for (;;)
{
char *cp;
@@
-422,7
+424,7
@@
outp_configure_macro (char *bp)
/* Destroys all the drivers in driver list *DL and sets *DL to
NULL. */
/* Destroys all the drivers in driver list *DL and sets *DL to
NULL. */
-void
+
static
void
destroy_list (struct outp_driver ** dl)
{
struct outp_driver *d, *next;
destroy_list (struct outp_driver ** dl)
{
struct outp_driver *d, *next;
@@
-956,7
+958,7
@@
outp_evaluate_dimension (char *dimen, char **tail)
if (c <= 0.0 || ptail == s)
goto lossage;
s = ptail;
if (c <= 0.0 || ptail == s)
goto lossage;
s = ptail;
- if (
approx_eq (c, 0.0)
)
+ if (
c == 0.0
)
goto lossage;
if (value > 0)
value += b / c;
goto lossage;
if (value > 0)
value += b / c;
@@
-968,7
+970,7
@@
outp_evaluate_dimension (char *dimen, char **tail)
double b;
s = &ptail[1];
b = strtod (s, &ptail);
double b;
s = &ptail[1];
b = strtod (s, &ptail);
- if (
approx_le (b, 0.0)
|| ptail == s)
+ if (
b <= 0.0
|| ptail == s)
goto lossage;
s = ptail;
value /= b;
goto lossage;
s = ptail;
value /= b;
@@
-1027,7
+1029,7
@@
outp_evaluate_dimension (char *dimen, char **tail)
ptail += 2;
value *= factor;
}
ptail += 2;
value *= factor;
}
- if (
approx_lt (value, 0.0)
)
+ if (
value <= 0.0
)
goto lossage;
if (tail)
*tail = ptail;
goto lossage;
if (tail)
*tail = ptail;
@@
-1147,6
+1149,7
@@
outp_get_paper_size (char *size, int *h, int *v)
where.filename = pprsz_fn;
where.line_number = 0;
err_push_file_locator (&where);
where.filename = pprsz_fn;
where.line_number = 0;
err_push_file_locator (&where);
+ ds_init (NULL, &line, 128);
if (pprsz_fn == NULL)
{
if (pprsz_fn == NULL)
{
@@
-1162,7
+1165,6
@@
outp_get_paper_size (char *size, int *h, int *v)
goto exit;
}
goto exit;
}
- ds_init (NULL, &line, 128);
for (;;)
{
char *cp, *bp, *ep;
for (;;)
{
char *cp, *bp, *ep;