pike.git
/
src
/
modules
/
Perl
/
perlmod.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/Perl/perlmod.c:1:
/* || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information.
-
|| $Id: perlmod.c,v 1.
35
2004/04/
06
13:
00:
48
nilsson Exp $
+
|| $Id: perlmod.c,v 1.
36
2004/04/
15
00:
11:26
nilsson Exp $
*/ #define NO_PIKE_SHORTHAND #include "builtin_functions.h" #include "global.h" #include "svalue.h" #include "array.h" #include "stralloc.h" #include "interpret.h"
pike.git/src/modules/Perl/perlmod.c:442:
ps->argv=(char **)xalloc(sizeof(char *)*ps->argv_strings->size); for(e=0;e<ps->argv_strings->size;e++) ps->argv[e]=ITEM(ps->argv_strings)[e].u.string->str; if(env_mapping) { INT32 d; int env_block_size=0; char *env_blockp; struct keypair *k;
-
MAPPING
_
LOOP(
env_mapping)
+
struct mapping_data *md = env_mapping->data;
+
NEW_
MAPPING_LOOP(
md
)
env_block_size+=k->ind.u.string->len+k->val.u.string->len+2; ps->env_block=xalloc(env_block_size); ps->env=(char **)xalloc(sizeof(char *)*(m_sizeof(env_mapping)+1)); env_blockp = ps->env_block; d=0;
-
MAPPING_LOOP(
env_mapping
)
+
NEW_
MAPPING_LOOP(
md
)
{ ps->env[d++]=env_blockp; MEMCPY(env_blockp,k->ind.u.string->str,k->ind.u.string->len); env_blockp+=k->ind.u.string->len; *(env_blockp++)='='; MEMCPY(env_blockp,k->val.u.string->str,k->ind.u.string->len); env_blockp+=k->val.u.string->len;