X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/412206fddb90693452fe0329689b93b0b23eb4e2..f819b74dce7f569980e840390925f5294fabeaf0:/env.c diff --git a/env.c b/env.c index 4aff65e..d3467b8 100644 --- a/env.c +++ b/env.c @@ -1,13 +1,13 @@ /* -*-c-*- * - * $Id: env.c,v 1.3 2001/01/20 11:48:10 mdw Exp $ + * $Id: env.c,v 1.5 2004/04/08 01:36:11 mdw Exp $ * * Fiddling with environment variables * * (c) 1999 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of the mLib utilities library. * @@ -15,32 +15,18 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * mLib is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with mLib; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: env.c,v $ - * Revision 1.3 2001/01/20 11:48:10 mdw - * Use new @SYM_LEN@ macro for name lengths. - * - * Revision 1.2 2000/06/17 10:39:00 mdw - * Add support for arena management. - * - * Revision 1.1 1999/07/26 23:15:57 mdw - * Fiddling with environment variables. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -177,7 +163,7 @@ char **env_export(sym_table *t) for (sym_mkiter(&i, t); (v = sym_next(&i)) != 0; ) { n++; - sz += SYM_LEN(v) + strlen(v->v) + 1; + sz += SYM_LEN(v) + strlen(v->v) + 2; } /* --- Allocate the big chunk of memory --- */