delorie.com/archives/browse.cgi | search |
From: | "Rafal Maj" <maj_rafal AT poczta DOT onet DOT pl> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | setftime - bug ? |
Date: | Sun, 6 May 2001 21:31:19 +0200 |
Organization: | Academic Computer Center CYFRONET AGH |
Lines: | 27 |
Message-ID: | <9d48o3$r56$1@info.cyf-kr.edu.pl> |
NNTP-Posting-Host: | d-94-53-14.cyfronet.krakow.pl |
X-Trace: | info.cyf-kr.edu.pl 989177411 27814 149.156.1.174 (6 May 2001 19:30:11 GMT) |
X-Complaints-To: | news AT cyf-kr DOT edu DOT pl |
NNTP-Posting-Date: | Sun, 6 May 2001 19:30:11 +0000 (UTC) |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.00.2615.200 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2615.200 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hi, yester day, when I was reporting problems with compiling program using time(), I was thinking about setftime() function (sorry). Ther is small bug (I think) in dos.h or in example for setftime() - ftime structure has in dos.h declared field 'ft_tsec' with is called 'ft_sec' in help. #include <time.h> #include <dos.h> #include <fcntl.h> #include <sys/stat.h> /* for mode definitions */ #include <unistd.h> main() { int q = open("data.txt", O_RDONLY); struct ftime f; // f.ft_sec = f.ft_min = f.ft_hour = f.ft_day = f.ft_month = f.ft_year = 0; // Error: `struct ftime' has no member named `ft_sec' f.ft_tsec = f.ft_min = f.ft_hour = f.ft_day = f.ft_month = f.ft_year = 0; file://correct setftime(q, &f); close(q); } Raf256
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |