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

Diff for /mandoc/compat_getsubopt.c between version 1.4 and 1.6

version 1.4, 2014/08/16 19:00:01 version 1.6, 2020/06/15 01:37:15
Line 1 
Line 1 
 #include "config.h"  /*      $Id$ */
   
 #if HAVE_GETSUBOPT  
   
 int dummy;  
   
 #else  
   
 /*      $OpenBSD$       */  /*      $OpenBSD$       */
   
 /*-  /*-
Line 36  int dummy;
Line 29  int dummy;
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF   * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   #include "config.h"
   
 #include <unistd.h>  #include <unistd.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   
 /*  
  * The SVID interface to getsubopt provides no way of figuring out which  
  * part of the suboptions list wasn't matched.  This makes error messages  
  * tricky...  The extern variable suboptarg is a pointer to the token  
  * which didn't match.  
  */  
 char *suboptarg;  
   
 int  int
 getsubopt(char **optionp, char * const *tokens, char **valuep)  getsubopt(char **optionp, char * const *tokens, char **valuep)
 {  {
         int cnt;          int cnt;
           char *suboptarg;
         char *p;          char *p;
   
         suboptarg = *valuep = NULL;          suboptarg = *valuep = NULL;
Line 98  getsubopt(char **optionp, char * const *tokens, char *
Line 85  getsubopt(char **optionp, char * const *tokens, char *
                         return(cnt);                          return(cnt);
         return(-1);          return(-1);
 }  }
   
 #endif  

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

CVSweb