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

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

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

revision 1.7 by wl, Sun Feb 27 06:26:15 2005 UTC revision 1.8 by wl, Tue May 3 10:05:32 2005 UTC
# Line 284  void html_text::flush_text (void) Line 284  void html_text::flush_text (void)
284      }      }
285      p = stackptr;      p = stackptr;
286      stackptr = stackptr->next;      stackptr = stackptr->next;
287      free(p);      delete p;
288    }    }
289    lastptr = NULL;    lastptr = NULL;
290  }  }
# Line 374  void html_text::do_push (tag_definition Line 374  void html_text::do_push (tag_definition
374    
375  void html_text::push_para (HTML_TAG t, void *arg, html_indent *in)  void html_text::push_para (HTML_TAG t, void *arg, html_indent *in)
376  {  {
377    tag_definition *p=(tag_definition *)malloc(sizeof(tag_definition));    tag_definition *p= new tag_definition;
378    
379    p->type         = t;    p->type         = t;
380    p->arg1         = arg;    p->arg1         = arg;
# Line 394  void html_text::push_para (HTML_TAG t) Line 394  void html_text::push_para (HTML_TAG t)
394    
395  void html_text::push_para (color *c)  void html_text::push_para (color *c)
396  {  {
397    tag_definition *p=(tag_definition *)malloc(sizeof(tag_definition));    tag_definition *p = new tag_definition;
398    
399    p->type         = COLOR_TAG;    p->type         = COLOR_TAG;
400    p->arg1         = NULL;    p->arg1         = NULL;
# Line 534  char *html_text::shutdown (HTML_TAG t) Line 534  char *html_text::shutdown (HTML_TAG t)
534          lastptr = NULL;          lastptr = NULL;
535        if (p->indent != NULL)        if (p->indent != NULL)
536          delete p->indent;          delete p->indent;
537        free(p);        delete p;
538      }      }
539    
540      /*      /*
# Line 547  char *html_text::shutdown (HTML_TAG t) Line 547  char *html_text::shutdown (HTML_TAG t)
547          push_para(temp->type, temp->arg1, temp->indent);          push_para(temp->type, temp->arg1, temp->indent);
548        p    = temp;        p    = temp;
549        temp = temp->next;        temp = temp->next;
550        free(p);        delete p;
551      }      }
552    }    }
553    return arg;    return arg;
# Line 879  void html_text::remove_def (tag_definiti Line 879  void html_text::remove_def (tag_definiti
879        if (l->next == NULL)        if (l->next == NULL)
880          lastptr = l;          lastptr = l;
881      }      }
882      free(p);      delete p;
883    }    }
884  }  }
885    
# Line 945  int html_text::remove_break (void) Line 945  int html_text::remove_break (void)
945        if (l->next == NULL)        if (l->next == NULL)
946          lastptr = l;          lastptr = l;
947      }      }
948      free(p);      delete p;
949    }    }
950    /*    /*
951     *  now determine whether text was issued before <br>     *  now determine whether text was issued before <br>

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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