pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.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: builtin_functions.c,v 1.528 2004/02/02 20:45:19 grubba Exp $ + || $Id: builtin_functions.c,v 1.529 2004/02/03 09:07:40 grubba Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.528 2004/02/02 20:45:19 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.529 2004/02/03 09:07:40 grubba Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:4419: Inside #if defined(HAVE_GMTIME)
      /* Assume dst is one hour. */    target_tm->tm_hour -= target_tm->tm_isdst;       /* This loop seems stable, and usually converges in two passes.    * The loop counter is for paranoia reasons.    */    while((diff_ts = my_tm_diff(target_tm, current_tm = gmtime(&current_ts)))) {    current_ts += diff_ts;    loop_cnt++; -  fprintf(stderr, "Loop [%d]: %d, %d\n", loop_cnt, current_ts, diff_ts); +  /* fprintf(stderr, "Loop [%d]: %d, %d\n", loop_cnt, current_ts, diff_ts); */    if (loop_cnt > 20) {    /* Infinite loop? */    return -1;    }    }    /* Check that the result tm looks like what we expect... */    if ((current_tm->tm_sec == target_tm->tm_sec) &&    (current_tm->tm_min == target_tm->tm_min)) {    /* Odds are that the rest of the fields are correct (1:3600). */    return current_ts;