Lines Matching +defs:val +defs:to

12  * "Very useful, no doubt, that was to Saruman; yet it seems that he was
44 * in handy.h, so that we can easily redefine everything to do tracking of
45 * allocated hunks back to the original New to track down any memory leaks.
46 * XXX This advice seems to be widely ignored :-( --AD August 1996.
75 /* Can't use PerlIO to write as it allocates memory */
124 /* Can't use PerlIO to write as it allocates memory */
178 /* Can't use PerlIO to write as it allocates memory */
218 /* copy a string up to some (non-backslashed) delimiter, if any */
221 Perl_delimcpy(pTHX_ register char *to, register char *toend, register char *from, register char *fromend, register int delim, I32 *retlen)
229 if (to < toend)
230 *to++ = *from;
237 if (to < toend)
238 *to++ = *from;
240 if (to < toend)
241 *to = '\0';
246 /* return ptr to little string in big string, NULL if not found */
348 Analyses the string in order to make fast searches on it using fbm_instr()
415 /* If SvTAIL is actually due to \Z or \z, this gives false positives
423 does not have to be fbm_compiled, but the search will not be as fast
594 if (s < bigend) /* fake up continue to outer loop */
614 the next call needs to find the .
621 /* If SvTAIL is actually due to \Z or \z, this gives false positives
736 /* copy a string to a safe spot */
743 Perl's version of C<strdup()>. Returns a pointer to a newly allocated
768 pointer to a newly allocated string which is a duplicate of the first
781 /* Give a meaning to NULL pointer mainly for the use in sv_magic() */
827 /* Create as PVMG now, to avoid any upgrading later */
864 Uses a single private buffer so if you want to format several strings you
959 * can try to find such a cop by searching through the optree starting
1230 This is the XSUB-writer's interface to Perl's C<die> function.
1232 function. Calling C<croak> returns control directly to Perl,
1235 If you want to throw an exception object, assign the object to
1236 C<$@> and then pass C<Nullch> to croak():
1318 This is the XSUB-writer's interface to Perl's C<warn> function. Call this
1443 /* since we've already done strlen() for both nam and val
1444 * we can use that info to make things faster than
1445 * sprintf(s, "%s=%s", nam, val)
1447 #define my_setenv_format(s, nam, nlen, val, vlen) \
1450 Copy(val, s+(nlen+1), vlen, char); \
1457 Perl_my_setenv(pTHX_ char *nam, char *val)
1485 if (!val) {
1500 vlen = strlen(val);
1504 my_setenv_format(environ[i], nam, nlen, val, vlen);
1508 setenv(nam, val, 1);
1512 if (!val) {
1513 val = "";
1515 vlen = strlen(val);
1518 my_setenv_format(new_env, nam, nlen, val, vlen);
1528 Perl_my_setenv(pTHX_ char *nam,char *val)
1533 if (!val) {
1534 val = "";
1536 vlen = strlen(val);
1538 my_setenv_format(envstr, nam, nlen, val, vlen);
1559 break; /* strnEQ must come first to avoid */
1581 Perl_my_bcopy(register const char *from,register char *to,register I32 len)
1583 char *retval = to;
1585 if (from - to >= 0) {
1587 *to++ = *from++;
1590 to += len;
1593 *(--to) = *(--from);
1852 /* Now dup our end of _the_ pipe to right position */
1899 /* If we managed to get status pipe check for exec fail */
2089 /* Call system's popen() to get a FILE *, then import it.
2090 used 0 for 2nd parameter to PerlIO_importFILE;
2102 /* Call system's popen() to get a FILE *, then import it.
2103 used 0 for 2nd parameter to PerlIO_importFILE;
2548 Perl_repeatcpy(pTHX_ register char *to, register const char *from, I32 len, register I32 count)
2556 *to++ = c;
2561 *to++ = *from++;
2625 /* additional extensions to try in each dir if scriptname not found */
2670 /* The first time through, just add SEARCH_EXTS to whatever we
2967 /* someone else beat us to initialising it */
3089 /* parent thread's data needs to be locked while we make copy */
3098 PL_curstash = t->Tcurstash; /* always be set to main? */
3407 "\t(Are you trying to call %s%s on dirhandle %s?)\n",
3417 "\t(Are you trying to call %s%s on dirhandle?)\n",
3466 * system to give us a reasonable struct to copy. This fix means that
3518 /* offset to bias by March (month 4) 1st between month/mday & year finding */
3527 * an offset into the year by considering months to have 30.6 (153/5) days,
3529 * messing about with leap days, we consider January and February to be
3531 * we need the month index we use to be high by 1 from 'normal human' usage,
3544 * For going backward, we need to bias the value we're using so that we find
3546 * March 1st to the number to apply while deriving the year). Having done
3547 * that, we 'count up' the contribution to the year number by accounting for
3549 * the contribution from full centuries (to avoid counting in the lost leap
3550 * days), plus the contribution from full quad-years (to count in the normal
3554 * to special-case that result, and (earlier) keep track of the 'odd'
3559 * and the remainder is the day-of-month. We then have to convert back to
3561 * the previous year to being in the proper year). After that, to get
3567 * Since POSIX time routines are only guaranteed to work for times since the
3569 * applies Gregorian calendar rules even to dates before the 16th century
3571 * date to know whether it was Julian or Gregorian calendar, and that's
3573 * same rules we used to build the yearday, you'll only get strange results
3578 * This algorithm also fails to handle years before A.D. 1 gracefully, but
3586 /* allow given yday with no month & mday to dominate the result */
3603 * so we have to trust the user if we get something which looks
3619 /* back off an extra day to compensate */
3640 * To avoid mistaking a legitimate Feb 29 as Mar 1, we need to
3641 * bias it by 123 while trying to figure out what year it
3684 /* re-build yearday based on Jan 1 to get tm_yday */
3714 /* use libc to get the values for tm_gmtoff and tm_zone [perl #18238] */
3732 ** The following is needed to handle to the situation where
3733 ** tmpbuf overflows. Basically we want to allocate a buffer
3739 ** 3. the format string specifies nothing to be returned(not
3742 ** If there is a better way to make it portable, go ahead by
3757 /* heuristic to prevent out-of-memory errors */
3793 * rewritten again by dougm, optimized for use with xs TARG, and to prefer
3904 /* prepend current directory to the front */
3955 /* Fake a datagram socketpair using UDP to localhost. */
3978 /* Now have 2 UDP sockets. Find out which port each is connected to, and
3979 for each connect the other socket to it. */
3993 /* Now we have 2 sockets connected to each other. I don't trust some other
3994 process not to have already sent a packet to us (by random) so send
3995 a packet from each to the other. */
3998 /* I'm going to send my own port number. As a short.
4010 /* Packets sent. I don't trust them to have arrived though.
4012 connect to localhost will use a second kernel thread. In 2.6 the
4017 So I don't trust someone not to have an unpredictable UDP stack.
4039 /* And the paranoia department even now doesn't trust it to have arrive
4096 I'm going to enforce that, then ignore it, and use TCP (or UDP). */
4139 /* We want to find out the port number to connect to. */
4158 /* Now check we are talking to ourself by matching port and host on the
4190 * to the my_socketpair in global.sym. */
4206 Exists to avoid test for a NULL function pointer and because it could potentially warn under
4221 Exists to avoid test for a NULL function pointer and because it could potentially warn under
4237 Exists to avoid test for a NULL function pointer and because it could potentially warn under
4309 * if someone who knows about such things would bother to write it.
4310 * Might be a good idea to add that function to CORE as well.
4312 * except they are primes and SEED_C1 > 1E6 to get a full-width
4349 * PERL_RANDOM_DEVICE to it if you'd prefer Perl to block until there
4350 * is enough real entropy to fill the seed. */
4402 /* Since there are not enough randbits to to reach all