[BACK]Return to mdoc.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mdoc.c between version 1.155 and 1.159

version 1.155, 2010/07/01 23:01:47 version 1.159, 2010/07/18 17:00:26
Line 1 
Line 1 
 /*      $Id$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
    * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 29 
Line 30 
 #include <time.h>  #include <time.h>
   
 #include "mandoc.h"  #include "mandoc.h"
 #include "regs.h"  
 #include "libmdoc.h"  #include "libmdoc.h"
 #include "libmandoc.h"  #include "libmandoc.h"
   
Line 518  static void
Line 518  static void
 mdoc_node_free(struct mdoc_node *p)  mdoc_node_free(struct mdoc_node *p)
 {  {
   
           /*
            * XXX: if these end up being problematic in terms of memory
            * management and dereferencing freed blocks, then make them
            * into reference-counted double-pointers.
            */
   
         if (MDOC_Bd == p->tok && MDOC_BLOCK == p->type)          if (MDOC_Bd == p->tok && MDOC_BLOCK == p->type)
                 if (p->data.Bd)                  if (p->data.Bd)
                         free(p->data.Bd);                          free(p->data.Bd);
         if (MDOC_Bl == p->tok && MDOC_BLOCK == p->type)          if (MDOC_Bl == p->tok && MDOC_BLOCK == p->type)
                 if (p->data.Bl)                  if (p->data.Bl)
                         free(p->data.Bl);                          free(p->data.Bl);
           if (MDOC_Bf == p->tok && MDOC_HEAD == p->type)
                   if (p->data.Bf)
                           free(p->data.Bf);
   
         if (p->string)          if (p->string)
                 free(p->string);                  free(p->string);
Line 712  mdoc_ptext(struct mdoc *m, int line, char *buf, int of
Line 721  mdoc_ptext(struct mdoc *m, int line, char *buf, int of
   
         assert(buf < end);          assert(buf < end);
   
         if (mandoc_eos(buf+offs, (size_t)(end-buf-offs)))          if (mandoc_eos(buf+offs, (size_t)(end-buf-offs), 0))
                 m->last->flags |= MDOC_EOS;                  m->last->flags |= MDOC_EOS;
   
         return(1);          return(1);

Legend:
Removed from v.1.155  
changed lines
  Added in v.1.159

CVSweb