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

Diff for /mandoc/compat_stringlist.c between version 1.1 and 1.2

version 1.1, 2015/05/20 20:55:04 version 1.2, 2015/05/20 22:22:59
Line 1 
Line 1 
   /*      $Id$    */
 /*  /*
  * Copyright (c) 1994 Christos Zoulas   * Copyright (c) 1994 Christos Zoulas <christos@netbsd.org>
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
Line 26 
Line 27 
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   
 #if defined(LIBC_SCCS) && !defined(lint)  
 static char *rcsid = "$NetBSD: stringlist.c,v 1.2 1997/01/17 07:26:20 lukem Exp $";  
 #endif /* LIBC_SCCS and not lint */  
 #include <sys/cdefs.h>  
 __FBSDID("$FreeBSD$");  
   
 #include "namespace.h"  
 #include <stdio.h>  
 #include <string.h>  
 #include <err.h>  #include <err.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <stringlist.h>  #include <string.h>
 #include "un-namespace.h"  #include "compat_stringlist.h"
   
 #define _SL_CHUNKSIZE   20  #define _SL_CHUNKSIZE   20
   
Line 52  sl_init(void)
Line 44  sl_init(void)
   
         sl = malloc(sizeof(StringList));          sl = malloc(sizeof(StringList));
         if (sl == NULL)          if (sl == NULL)
                 _err(1, "stringlist: %m");                  err(1, "stringlist");
   
         sl->sl_cur = 0;          sl->sl_cur = 0;
         sl->sl_max = _SL_CHUNKSIZE;          sl->sl_max = _SL_CHUNKSIZE;
         sl->sl_str = malloc(sl->sl_max * sizeof(char *));          sl->sl_str = malloc(sl->sl_max * sizeof(char *));
         if (sl->sl_str == NULL)          if (sl->sl_str == NULL)
                 _err(1, "stringlist: %m");                  err(1, "stringlist");
         return sl;          return sl;
 }  }
   

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

CVSweb