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

Diff for /mandoc/mdoc_argv.c between version 1.98 and 1.101

version 1.98, 2014/11/28 23:21:32 version 1.101, 2015/04/02 21:36:50
Line 1 
Line 1 
 /*      $OpenBSD$ */  /*      $Id$ */
 /*  /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>   * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>   * Copyright (c) 2012, 2014 Ingo Schwarze <schwarze@openbsd.org>
Line 7 
Line 7 
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
  * copyright notice and this permission notice appear in all copies.   * copyright notice and this permission notice appear in all copies.
  *   *
  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES   * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES
  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF   * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR   * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES   * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
Line 24 
Line 24 
 #include <stdio.h>  #include <stdio.h>
 #include <string.h>  #include <string.h>
   
 #include "mdoc.h"  
 #include "mandoc.h"  
 #include "mandoc_aux.h"  #include "mandoc_aux.h"
 #include "libmdoc.h"  #include "mandoc.h"
   #include "roff.h"
   #include "mdoc.h"
 #include "libmandoc.h"  #include "libmandoc.h"
   #include "libmdoc.h"
   
 #define MULTI_STEP       5 /* pre-allocate argument values */  #define MULTI_STEP       5 /* pre-allocate argument values */
 #define DELIMSZ          6 /* max possible size of a delimiter */  #define DELIMSZ          6 /* max possible size of a delimiter */
Line 339  mdoc_argv(struct mdoc *mdoc, int line, enum mdoct tok,
Line 340  mdoc_argv(struct mdoc *mdoc, int line, enum mdoct tok,
                 /* Parse the arguments of the flag. */                  /* Parse the arguments of the flag. */
   
                 tmpv.line  = line;                  tmpv.line  = line;
                 tmpv.pos   = ipos;                  tmpv.pos   = *pos;
                 tmpv.sz    = 0;                  tmpv.sz    = 0;
                 tmpv.value = NULL;                  tmpv.value = NULL;
   
Line 412  argn_free(struct mdoc_arg *p, int iarg)
Line 413  argn_free(struct mdoc_arg *p, int iarg)
 }  }
   
 enum margserr  enum margserr
 mdoc_zargs(struct mdoc *mdoc, int line, int *pos, char *buf, char **v)  
 {  
   
         return(args(mdoc, line, pos, buf, ARGSFL_NONE, v));  
 }  
   
 enum margserr  
 mdoc_args(struct mdoc *mdoc, int line, int *pos,  mdoc_args(struct mdoc *mdoc, int line, int *pos,
                 char *buf, enum mdoct tok, char **v)                  char *buf, enum mdoct tok, char **v)
 {  {
         enum argsflag     fl;  
         struct mdoc_node *n;          struct mdoc_node *n;
           char             *v_local;
           enum argsflag     fl;
   
         fl = mdocargs[tok].flags;          if (v == NULL)
                   v = &v_local;
         if (MDOC_It != tok)          fl = tok == MDOC_MAX ? ARGSFL_NONE : mdocargs[tok].flags;
           if (tok != MDOC_It)
                 return(args(mdoc, line, pos, buf, fl, v));                  return(args(mdoc, line, pos, buf, fl, v));
   
         /*          /*

Legend:
Removed from v.1.98  
changed lines
  Added in v.1.101

CVSweb