delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/06/08/02:30:18

From: "Gorden" <gorden AT ms9 DOT url DOT com DOT tw>
Newsgroups: comp.os.msdos.djgpp
Subject: maybe djgpp bug ?
Date: Fri, 8 Jun 2001 14:25:16 +0800
Organization: DCI HiNet
Lines: 54
Message-ID: <9fpr55$ode@netnews.hinet.net>
NNTP-Posting-Host: 61-216-140-177.hinet-ip.hinet.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

#include <dos.h>
#include <time.h>

/* This Source Code Can't Setting New Time */
void main(void)
{
  int result;
  struct time ti;
  static char string[256];
  static struct tm the_time;
  time_t current_time;
  struct tm *t;
  char *sptr;

  ti.ti_hour = 11;
  ti.ti_min = 12;
  settime(&ti);
}

/* This Source Code Can Setting New Time */
void main(void)
{
  int result;
  struct time tii, ti;
  static char string[256];
  static struct tm the_time;
  time_t current_time;
  struct tm *t;
  char *sptr;

  ti.ti_hour = 11;
  ti.ti_min = 12;
  settime(&ti);
}

/* This Source Code Can Setting New Time */
void main(void)
{
  int result;
  static char string[256];
  static struct tm the_time;
  time_t current_time;
  struct tm *t;
  char *sptr;
  struct time ti;

  ti.ti_hour = 11;
  ti.ti_min = 12;
  settime(&ti);
}

Why?


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019