| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Pointer to a pointer to a point |
-19 Oct 96 07:09:05-
=Jani Patanen babbled to All about Pointer to a pointer to a pointer and
other problems.=
JP> It's been a while since I've been handling pointers to a pointer. Not
JP> to say about pointer in third degree. So I'm having some problems
JP> here. I'm trying to port scandir to OS/2. (if you have on, I'd love to
JP> get it). I'm using EMX 0.9b.
First of all, you have to dereference them all. Second, you cannot use
sprintf to write to an int :)
Replace these lines:
JP> sprintf((namelist+(items-1))->d_name,"%s",FindBuffer.achName);
JP>
JP>
sprintf((namelist+items-1)->d_namlen,"%lu",strlen(FindBuffer.achName));
JP> sprintf((namelist+items-1)->d_size,"%l",FindBuffer.cbFile);
JP> *(namelist+items-1)->d_time=0; /* not interested making conversion */
JP> *(namelist+items-1)->d_date=0; /* I doubt it's needed */
JP> *(namelist+items-1)->d_attr=0;
with these:
sprintf((**(namelist+(items-1)))->d_name,"%s",FindBuffer.achName);
(**(namelist+items-1))->d_namlen=strlen(FindBuffer.achName);
(**(namelist+items-1))->d_size=FindBuffer.cbFile;
(**(namelist+items-1))->d_time=0; /* not interested making conversion */
(**(namelist+items-1))->d_date=0; /* I doubt it's needed */
(**(namelist+items-1))->d_attr=0;
Mike Phillips
INTERNET: phil4086{at}utdallas.edu
... ,ÄÄÄÄÄï¶ÛÛÛÛÛÛÛÛÛ°°°°°³ÆÍÍÍÍÝ Tagline Injection!
--- FMail 1.0g
* Origin: oOo The Pit Viper oOo (1:124/2145)SEEN-BY: 50/99 270/101 620/243 625/160 711/401 409 410 413 430 808 809 934 SEEN-BY: 711/955 712/407 515 624 628 713/317 800/1 @PATH: 124/2145 2342 1 396/1 270/101 712/515 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.