Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

localtime()

Name: Anonymous 2007-12-27 8:38

Hi everyone, im looking for source of the localtime() function as well as the time() function [C] as i wish to know how it converts a four figures char into a struct with 7 int values?

#include <stdio.h>
#include <time.h>

int main ()
{
  char cha[]="X5r6";
  struct tm * timeinfo;
  timeinfo = localtime ( &cha );
   printf("%s",asctime (localtime ( &cha )));
  //How does X5r6 turn into this ?
   printf("%d %d %d %d %d %d %d\n",timeinfo->tm_wday,
        timeinfo->tm_mon,
        timeinfo->tm_mday, timeinfo->tm_hour,
        timeinfo->tm_min, timeinfo->tm_sec,
        1900 + timeinfo->tm_year);
  return 0;
}

Name: Anonymous 2007-12-27 9:12

Magic.

Name: Anonymous 2007-12-27 11:22

mkdir libc6-src
cd libc6-src
apt-get source libc6
cd glibc-2*
tar xjvf glibc-2*
cd glibc-2*/time
grep ^localtime *

Name: Anonymous 2007-12-28 7:04

>>3
grep ^localtime *
FUCKING GNU/HIPPIE THERES NO REASON TO PUT THE RETURN TYPE ON A LINE OF ITS OWN GRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR!!!!!!!!!1 IDES WILL DO THIS FOR YOU FAGGOT!!!!!!!! JUST START ECLIPSE AND WAIT SEVEN DAYS UNTIL IT HAS INDEXED HELLO WORLD AND YOULL FIND MAIN!!!!!1111111111111111111111

Don't change these.
Name: Email:
Entire Thread Thread List