/[groff]/groff/src/devices/grohtml/html-table.cpp
ViewVC logotype

Diff of /groff/src/devices/grohtml/html-table.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by wl, Wed Feb 16 14:07:24 2005 UTC revision 1.5 by wl, Tue May 3 10:05:32 2005 UTC
# Line 63  void tabs::delete_list (void) Line 63  void tabs::delete_list (void)
63    while (p != NULL) {    while (p != NULL) {
64      q = p;      q = p;
65      p = p->next;      p = p->next;
66      free(q);      delete q;
67    }    }
68    tab = NULL;    tab = NULL;
69  }  }
# Line 150  void tabs::init (const char *s) Line 150  void tabs::init (const char *s)
150      while ((*s != (char)0) && !isspace(*s))      while ((*s != (char)0) && !isspace(*s))
151        s++;        s++;
152      if (last == NULL) {      if (last == NULL) {
153        tab = (tab_position *)malloc(sizeof(tab_position));        tab = new tab_position;
154        last = tab;        last = tab;
155      } else {      } else {
156        last->next = (tab_position *)malloc(sizeof(tab_position));        last->next = new tab_position;
157        last = last->next;        last = last->next;
158      }      }
159      last->alignment = align;      last->alignment = align;
# Line 253  html_table::~html_table () Line 253  html_table::~html_table ()
253    c = columns;    c = columns;
254    while (columns != NULL) {    while (columns != NULL) {
255      columns = columns->next;      columns = columns->next;
256      free(c);      delete c;
257      c = columns;      c = columns;
258    }    }
259  }  }
# Line 269  void html_table::remove_cols (cols *c) Line 269  void html_table::remove_cols (cols *c)
269    while (c != NULL) {    while (c != NULL) {
270      p = c;      p = c;
271      c = c->next;      c = c->next;
272      free(p);      delete p;
273    }    }
274  }  }
275    
# Line 571  int html_table::insert_column (int coln, Line 571  int html_table::insert_column (int coln,
571        (l->next->left < hend))        (l->next->left < hend))
572      return FALSE;  // new column bumps into next one      return FALSE;  // new column bumps into next one
573    
574    n = (cols *)malloc(sizeof(cols));    n = new cols;
575    if (l == NULL) {    if (l == NULL) {
576      n->next = columns;      n->next = columns;
577      columns = n;      columns = n;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26