#include "alloc.h"
#include "error.h"
#include "filename.h"
+#include "glob.h"
#include "main.h"
#include "misc.h"
#include "output.h"
static int
ascii_open_global (struct outp_class *this UNUSED)
{
- option_info = xmalloc ( sizeof (struct outp_option_info ) ) ;
+ option_info = xmalloc (sizeof *option_info);
option_info->initial = 0;
option_info->options = 0;
return 1;
assert (this->driver_open == 0);
msg (VM (1), _("ASCII driver initializing as `%s'..."), this->name);
- this->ext = x = xmalloc (sizeof (struct ascii_driver_ext));
+ this->ext = x = xmalloc (sizeof *x);
x->char_set = CHS_ASCII;
x->headers = 1;
x->page_length = 66;
if (x->l > x->lines_cap)
{
- x->lines = xrealloc (x->lines, sizeof *x->lines * x->l);
+ x->lines = xnrealloc (x->lines, x->l, sizeof *x->lines);
for (i = x->lines_cap; i < x->l; i++)
{
struct line *line = &x->lines[i];
if (l > line->char_cap)
{
line->char_cap = l * 2;
- line->chars = xrealloc (line->chars,
- line->char_cap * sizeof *line->chars);
+ line->chars = xnrealloc (line->chars,
+ line->char_cap, sizeof *line->chars);
}
for (j = line->char_cnt; j < l; j++)
line->chars[j] = ' ';
{
char temp[40];
- snprintf (temp, 80, _("%s - Page %d"), curdate, x->page_number);
+ snprintf (temp, 80, _("%s - Page %d"), get_start_date (),
+ x->page_number);
memcpy (&s[x->w - strlen (temp)], temp, strlen (temp));
}