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.482 2008/04/23 07:37:03 mast Exp $ + || $Id: builtin_functions.c,v 1.483 2008/04/23 11:16:55 grubba Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.482 2008/04/23 07:37:03 mast Exp $"); + RCSID("$Id: builtin_functions.c,v 1.483 2008/04/23 11:16:55 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:4168: Inside #if defined(HAVE_GMTIME)
  PMOD_EXPORT void f_gmtime(INT32 args)   {    struct tm *tm;    LONGEST tt;    time_t t;       get_all_args("gmtime", args, "%l", &tt);      #if SIZEOF_TIME_T < SIZEOF_LONGEST    if ((time_t) tt != tt) -  SIMPLE_ARG_ERROR ("gmtime", 1, "Timestamp outside valid range."); +  SIMPLE_BAD_ARG_ERROR ("gmtime", 1, "int.");   #endif    t = (time_t) tt;       tm = gmtime(&t);    if (!tm) Pike_error ("gmtime() on this system cannot handle "    "the timestamp %ld.\n", (long) t);    pop_n_elems(args);    encode_struct_tm(tm);       push_string(make_shared_string("timezone"));
pike.git/src/builtin_functions.c:4234: Inside #if defined(HAVE_LOCALTIME)
  PMOD_EXPORT void f_localtime(INT32 args)   {    struct tm *tm;    LONGEST tt;    time_t t;       get_all_args("localtime", args, "%l", &tt);      #if SIZEOF_TIME_T < SIZEOF_LONGEST    if ((time_t) tt != tt) -  SIMPLE_ARG_ERROR ("localtime", 1, "Timestamp outside valid range."); +  SIMPLE_BAD_ARG_ERROR ("localtime", 1, "int");   #endif    t = (time_t) tt;       tm = localtime(&t);    if (!tm) Pike_error ("localtime() on this system cannot handle "    "the timestamp %ld.\n", (long) t);    pop_n_elems(args);    encode_struct_tm(tm);       push_string(make_shared_string("timezone"));