pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] Changes to pspp/src/ascii.c


From: Ben Pfaff
Subject: [Pspp-cvs] Changes to pspp/src/ascii.c
Date: Wed, 26 Oct 2005 01:06:25 -0400

Index: pspp/src/ascii.c
diff -u pspp/src/ascii.c:1.18 pspp/src/ascii.c:1.19
--- pspp/src/ascii.c:1.18       Tue Oct 25 04:28:17 2005
+++ pspp/src/ascii.c    Wed Oct 26 05:06:14 2005
@@ -195,7 +195,7 @@
 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;
@@ -231,7 +231,7 @@
   
   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;
@@ -716,7 +716,7 @@
 
   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];
@@ -746,8 +746,8 @@
   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] = ' ';




reply via email to

[Prev in Thread] Current Thread [Next in Thread]