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

Diff for /mandoc/mandoc_xr.c between version 1.2 and 1.4

version 1.2, 2017/07/02 15:31:59 version 1.4, 2020/06/22 19:20:40
Line 1 
Line 1 
 /*      $Id$ */  /* $Id$ */
 /*  /*
  * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
  *   *
Line 14 
Line 14 
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
   #include "config.h"
   
 #include <sys/types.h>  #include <sys/types.h>
   
 #include <assert.h>  #include <assert.h>
Line 81  mandoc_xr_add(const char *sec, const char *name, int l
Line 83  mandoc_xr_add(const char *sec, const char *name, int l
         xr->name = xr->hashkey + ssz;          xr->name = xr->hashkey + ssz;
         xr->line = line;          xr->line = line;
         xr->pos = pos;          xr->pos = pos;
           xr->count = 1;
         memcpy(xr->sec, sec, ssz);          memcpy(xr->sec, sec, ssz);
         memcpy(xr->name, name, nsz);          memcpy(xr->name, name, nsz);
   
Line 97  mandoc_xr_add(const char *sec, const char *name, int l
Line 100  mandoc_xr_add(const char *sec, const char *name, int l
                 return 0;                  return 0;
         }          }
   
           oxr->count++;
         ret = (oxr->line == -1) ^ (xr->line == -1);          ret = (oxr->line == -1) ^ (xr->line == -1);
         if (xr->line == -1)          if (xr->line == -1)
                 oxr->line = -1;                  oxr->line = -1;

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

CVSweb