<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Got network working!!! But can&amp;#039;t do fwrite :(</title>
<description> I have had a good look at WiiEarth and have been able to extract the http and dns lib from it. I have set up an app which uses the http and dns lib from wiiearth to download [www.google.com].

The good thing is that i can download the file (well i think i can) but now i want to save the contents of the variable which contains something that is from google.com into a file. I have gotten as far as 


fopen(&quot;fat://google.txt&quot;, &quot;w&quot;); //File not created so set to w to create new file

Now how would I do fwrite? This is obviously wrong:

fwrite(file, &quot;fat://google.txt&quot;); //file contains the content of google.com

I found that fwrite needs a minimum of two arguments (http://www.mathworks.com/support/tech-notes/1600/1602.html]source[/url]) 

but how do i do fwrite with a variable of struct block:

struct block file = downloadfile(&quot;http://www.google.com/&quot;);


If anything else is needed like purpose of app or entire source then just ask!

Thx in advance (Firefox users will love you if you help, well kind of).</description><link>http://forum.wiibrew.org/read.php?11,8658,8658#msg-8658</link><lastBuildDate>Sat, 15 Aug 2026 18:25:20 +0200</lastBuildDate>
<generator>Phorum 5.2.23</generator>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,11931#msg-11931</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,11931#msg-11931</link><description><![CDATA[ If you just want a program to download files, that would not be too hard. I had written code over winter break to download a specified file but once school started up I got too busy to work any further. I might be able to work on a GUI over spring break and make it so that you can enter a URL and download that file, which should be useful. One problem is that I&#039;m trying to do everything from the ground up rather than use GRRLib/lws so it takes me a while to get stuff done. But my intention is to make a library specifically for making GUI applications that handles some basic input stuff for you, rather than using a sprite library and having to roll your own input detection. So yeah, my break is next week and hopefully you&#039;ll see something out of me by the end of next week.]]></description>
<dc:creator>iofthestorm</dc:creator>
<category>Coding</category><pubDate>Fri, 20 Mar 2009 09:25:54 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,11923#msg-11923</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,11923#msg-11923</link><description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>iofthestorm</strong><br />SVG is XML, which is purely text, not just indecipherable hex values. [<a href="http://www.w3schools.com/svg/svg_example.asp" rel="nofollow">www.w3schools.com</a>] But I don&#039;t think it&#039;s worth implementing in a homebrew web browser.</div></blockquote>
I agree. I think that all we need is a program that downloads files from the internet and saves them onto an sd card. Also, a file extractor would be nice.]]></description>
<dc:creator>jsmaster</dc:creator>
<category>Coding</category><pubDate>Fri, 20 Mar 2009 04:10:42 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9771#msg-9771</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9771#msg-9771</link><description><![CDATA[ SVG is XML, which is purely text, not just indecipherable hex values. [<a href="http://www.w3schools.com/svg/svg_example.asp" rel="nofollow">www.w3schools.com</a>] But I don&#039;t think it&#039;s worth implementing in a homebrew web browser.]]></description>
<dc:creator>iofthestorm</dc:creator>
<category>Coding</category><pubDate>Sat, 14 Feb 2009 01:55:23 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9746#msg-9746</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9746#msg-9746</link><description><![CDATA[ Hex is text. A representation of binary in a readable format.]]></description>
<dc:creator>scanff</dc:creator>
<category>Coding</category><pubDate>Fri, 13 Feb 2009 21:39:55 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9741#msg-9741</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9741#msg-9741</link><description><![CDATA[ Looks like hex to me???<br />I might not bother with SVGs since they only apear on wiki]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Fri, 13 Feb 2009 20:46:53 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9591#msg-9591</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9591#msg-9591</link><description><![CDATA[ SVG is still text though, it&#039;s XML.]]></description>
<dc:creator>iofthestorm</dc:creator>
<category>Coding</category><pubDate>Tue, 10 Feb 2009 04:04:00 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9586#msg-9586</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9586#msg-9586</link><description><![CDATA[ I hate building the GUI but i love designing it and email sent. I would be glad to have a look at your parser. BTW i am using C not C++<br /><br />Technically SVG isnt really text but a load of hex values but in HTML]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Fri, 06 Feb 2009 09:36:36 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9585#msg-9585</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9585#msg-9585</link><description><![CDATA[ Needs a lot more work. I&#039;ll send you my simple parser that retrieves certain div&#039;s and specific values from a webpage. Also remember that html is text so you can use functions like strstr and strtok to help you find tags (someone correct me if there is binary data in a html page :) ).<br /><br />Also don&#039;t start off by trying to parse out all the html attributes, you&#039;ll get frustrated too quickly. More advice would be to concentrate on html first, don&#039;t even attempt to decode script or DHTML. Here&#039;s the full HTML set of tags -<br /><br />[<a href="http://www.w3schools.com/tags/" rel="nofollow">www.w3schools.com</a>]<br /><br />Once you have something parsing the base HTML tags then work on pulling out the most important attributes like height,width,src and href.<br /><br />I&#039;ll lend a hand with the graphics. I&#039;ve got a nice template that I use that uses the SDL port with several work-a-arounds.<br /><br />Email me if you&#039;re interested - scanff <at> yahoo <dot> com]]></description>
<dc:creator>scanff</dc:creator>
<category>Coding</category><pubDate>Fri, 06 Feb 2009 09:11:18 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9515#msg-9515</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9515#msg-9515</link><description><![CDATA[ I have an idea for a parser (its a bit rough and i got confused with PHP halfway):<br /><br /><pre class="bbcode">
for(int i=0; i &lt; sizeof(HTML); i++;)
{
if(!tag)
{
if(HTML<i> = "&lt;")
{
var tag = TRUE; //expects tag name next loop
}
else
{
//send text to screen
}
}
else
{
if(isalpha(HTML<i>))
{
strcat ( tagname, HTML<i>);
}
else
if(isspace(HTML<i>))
{
params = TRUE;
}
}
else
if(params)
{
if(HTML<i> !="/" OR HTML<i> !="&gt;"
//slowly add params into array
}
}
</i></i></i></i></i></i></pre><br /><br />Thats some of it and it probably doesnt work anyway. Its obvious this is gonna take ages just to make the parser so i guess patience is needed a lot.<br /><br />P.S. I need someone who can do GUI since i can t handle graphics on the Wii yet]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Wed, 04 Feb 2009 22:30:01 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9344#msg-9344</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9344#msg-9344</link><description><![CDATA[ Where&#039;s the fun in that! Half the fun is writing the parser :)<br /><br />ANTLR looks like&#039;s it a java thingy. Anyway I&#039;ve been working on a really simple parser specifically for pulling items from webpages for my radio project. I&#039;m a little ways out from release due to me adding more features but your welcome to reuse the source when I release as a start point for a HTML parser.]]></description>
<dc:creator>scanff</dc:creator>
<category>Coding</category><pubDate>Mon, 02 Feb 2009 19:16:14 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9333#msg-9333</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9333#msg-9333</link><description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>SteelSLasher</strong><br /><blockquote class="bbcode"><div><small>Quote<br /></small><strong>mavakadachi</strong><br />port antlr !?! dont you generate c(++) code with antlr and just use it in your project?<br />Why do you need to use these? i thought you only needed to DL the html page+images and do a simple render on screen?</div></blockquote><br />Really? I should look that up since ANTLR has no support for C++ and i thought it was a library?</div></blockquote><br />NOTE: I havent done anything with it. From what i can tell its HARD to get it generating code for c++ and i couldnt get anything working with it. I havent tried hard tho.<br /><br />Why are you going to port antlr again? theres no reason to generate a parser for a custom script?]]></description>
<dc:creator>mavakadachi</dc:creator>
<category>Coding</category><pubDate>Mon, 02 Feb 2009 14:21:39 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9176#msg-9176</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9176#msg-9176</link><description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>mavakadachi</strong><br />port antlr !?! dont you generate c(++) code with antlr and just use it in your project?<br />Why do you need to use these? i thought you only needed to DL the html page+images and do a simple render on screen?</div></blockquote><br />Really? I should look that up since ANTLR has no support for C++ and i thought it was a library?]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Sat, 31 Jan 2009 14:57:22 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9166#msg-9166</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9166#msg-9166</link><description><![CDATA[ port antlr !?! dont you generate c(++) code with antlr and just use it in your project?<br />Why do you need to use these? i thought you only needed to DL the html page+images and do a simple render on screen?]]></description>
<dc:creator>mavakadachi</dc:creator>
<category>Coding</category><pubDate>Sat, 31 Jan 2009 08:10:53 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,9134#msg-9134</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,9134#msg-9134</link><description><![CDATA[ Thanks, right now i have two choices: port antlr or use a C++ wrapper with Boost Spirit]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Fri, 30 Jan 2009 19:45:36 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8949#msg-8949</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8949#msg-8949</link><description><![CDATA[ This sounds like an interesting project. I would be interested to see the development of this project progress. It would be cool to have a Firefox equivalent for the Wii simply because I prefer Firefox to other browsers competing browsers. I wish you the best of luck.]]></description>
<dc:creator>pcmantinker</dc:creator>
<category>Coding</category><pubDate>Wed, 28 Jan 2009 05:33:35 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8820#msg-8820</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8820#msg-8820</link><description><![CDATA[ Nice joke! I was thinking fo creating a system where different rules are set for certain websites, for YouTube I would extract the video from the url and display that using something (not sure yet).<br /><br />There is also a GNU of Flash which may be good<br /><br />BTW this is just an intermediate for creating some other game based tools (achievements, anti-FC etc.)]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Mon, 26 Jan 2009 12:11:21 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8806#msg-8806</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8806#msg-8806</link><description><![CDATA[ Why do you want to write this?<br />p0rN 4 your WII? (lolz)<br /><br />I cant see youtube working with this.<br />If you can get webpages i have an idea how to play youtube videos but last time i tried to compile mplayer i got errors (i didnt have the correct patches, this wasnt the current DKP)]]></description>
<dc:creator>mavakadachi</dc:creator>
<category>Coding</category><pubDate>Mon, 26 Jan 2009 02:47:46 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8798#msg-8798</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8798#msg-8798</link><description><![CDATA[ If you&#039;re trying to write a web browser then I&#039;d suggest taking a look at the source for firefox or dooble. You may get some ideas for writing your parser. Or I found this the other day - [<a href="http://code.peterstuifzand.nl/cgi-bin/gitweb.cgi?p=htmlparser.git;a=tree;f=src;h=f8d9be7ae2cb707170614fe6d53a7f2925dae9d0;hb=HEAD" rel="nofollow">code.peterstuifzand.nl</a>]<br /><br />Would be nice to have a free browser for the Wii but after looking it would be a lot of work and really thinking about it even with an on screen keyboard it would be easier for me just to open up my laptop an browse.]]></description>
<dc:creator>scanff</dc:creator>
<category>Coding</category><pubDate>Mon, 26 Jan 2009 02:16:00 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8765#msg-8765</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8765#msg-8765</link><description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>mavakadachi</strong><br />SteelSLasher: whats the app for? depending what you need you can do things in a very simple or very complex way.<br /><br />html render? are you trying to write a browser? what do you need the &#039;html render&#039; to do? i hope its just text and displaying jpgs + simple alignment (no br == fail)</div></blockquote><br />That&#039;s right! I am going to start with simple one column rendering then eventually add stuff to it.<br /><br />If you could recommend any methods which would be simple I would be grateful, I mean not having many of the php string functions natively in C really kicks you in the teeth when you try to EXPLODE! or IMPLODE! .<br /><br />I was thinking that i start a loop that goes through each character of the webpage and each &lt; it meets it will expect a word after it then a space and then... It shouldn&#039;t cause too many lazy code problems but I dont want to use regex<br /><br />I have a javascript renderer for wii (SpiderMonkey in C) but no renderers were coded in C (that i know of) so homemade it is then]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Sun, 25 Jan 2009 17:20:40 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8743#msg-8743</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8743#msg-8743</link><description><![CDATA[ SteelSLasher: whats the app for? depending what you need you can do things in a very simple or very complex way.<br /><br />html render? are you trying to write a browser? what do you need the &#039;html render&#039; to do? i hope its just text and displaying jpgs + simple alignment (no br == fail)]]></description>
<dc:creator>mavakadachi</dc:creator>
<category>Coding</category><pubDate>Sun, 25 Jan 2009 13:16:38 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8742#msg-8742</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8742#msg-8742</link><description><![CDATA[ OH GOD DAMN IT WORKS!!!<br /><br />Thnx ekeeke and others for helping me with this, now onto making a html renderer or finding one made in C.]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Sun, 25 Jan 2009 13:10:46 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8739#msg-8739</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8739#msg-8739</link><description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong></strong><br />file_ptr = fopen("fat://google.txt", "w");<br />fwrite(file.data,1,sizeof(file.data), file_ptr);</div></blockquote><br />two things:<br /><br />1/ file.data is a pointer so sizeof will not return the size of the data but the size of the pointer (4 bytes). You should rather use the filesize variable from the downloadfile() function<br /><br />2/ I think that with the last libfat, you can&#039;t use <b>fat:</b> any more as prefix for files, you have to use <b>usb:</b> or <b>sd:</b><br /><br />tbc]]></description>
<dc:creator>ekeeke</dc:creator>
<category>Coding</category><pubDate>Sun, 25 Jan 2009 12:38:36 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8738#msg-8738</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8738#msg-8738</link><description><![CDATA[ the code i gave wasnt all of it, above fatinitdefault() and a few network inits are called, it seems to compile so i should have a look again today]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Sun, 25 Jan 2009 11:12:11 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8717#msg-8717</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8717#msg-8717</link><description><![CDATA[ fatInitDefault() after including fat.h<br />if you cant get files working why dont you do a printf to see if it works.<br />Are you sure the code works with wii networking? because that great if it does :D (compiling and having it WORK is different)]]></description>
<dc:creator>mavakadachi</dc:creator>
<category>Coding</category><pubDate>Sun, 25 Jan 2009 01:59:11 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8675#msg-8675</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8675#msg-8675</link><description><![CDATA[ Did you call the fatInitDefault() before your file operations?]]></description>
<dc:creator>scanff</dc:creator>
<category>Coding</category><pubDate>Sat, 24 Jan 2009 20:13:29 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8674#msg-8674</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8674#msg-8674</link><description><![CDATA[ I just found out its a memory block and made a few changes according to the function.<br /><br />Heres the network init and downloader (Important bit underlined):<br /><pre class="bbcode">
	printf("Wii Browse Develepment Version 1\n");
	    printf("Waiting for network to initialize...");

        s32 ip;
    while ((ip = net_init()) == -EAGAIN)
        {
                printf(".");
                usleep(100000);
        }
        printf("\n");
        
    if(ip &lt; 0) {
                printf("Error while initialising, error is %i\n", ip);
        }
        
        char myIP[16];
    if (if_config(myIP, NULL, NULL, true) &lt; 0) {
                printf("Error reading IP address, exiting");
                exit(0);
        }
        printf("Network initialised.\n");
        
        printf("IP: %s\n\n", myIP);
        
        printf("Let&#039;s Browse!");
        
        usleep(1000 * 1000 * 1); //1 sec
        

	printf("Attempting to download HTML file from [<a href="http://www.google.com/"  rel="nofollow">www.google.com</a>]\n");
	<u>struct block file = downloadfile("http://www.google.com/");</u>
	printf("If domaind could not be resolved, connection ended :(\n Else the download completed successfully and youu should wait for me to do something new!\n");
<u>	FILE * file_ptr;
	
	file_ptr = fopen("fat://google.txt", "w");
	fwrite(file.data,1,sizeof(file.data), file_ptr);</u></pre><br />Here is the end of the downloadfile() function:<br /><pre class="bbcode">
	struct block file;
	file.data = malloc(filesize);
	file.size = filesize;
	
	if(file.data == NULL)
	{
		printf("No more memory to copy file from HTTP response\n");
		free(response.data);
		return emptyblock;
	}
	
	memcpy(file.data, filestart, filesize);

	//Dispose of the original response
	free(response.data);
	
	return file;
</pre>]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Sat, 24 Jan 2009 20:06:07 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8672#msg-8672</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8672#msg-8672</link><description><![CDATA[ Could you provide a small code example (preferably the declaration) of a "struct block". I think you just mean a normal struct named block, but I&#039;m not 100% sure. With a small code example, we would be able to better help you.]]></description>
<dc:creator>Arikado</dc:creator>
<category>Coding</category><pubDate>Sat, 24 Jan 2009 19:18:37 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8670#msg-8670</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8670#msg-8670</link><description><![CDATA[ I have a http lib which can connect to the internet and DOWNLOAD data such as webpages when a function is given a url of the format <pre class="bbcode">
[<a href="http://http://"  rel="nofollow">http</a>] [<a href="http://DOMAIN/(or"  rel="nofollow">DOMAIN</a>] PATH)</pre><br /><br />I know c to certain degree that I can make windows apps and thanks for pointing that matlab out but i am not at all familiar with "struct block" variables which is what i am stuck on. How would i get fwrite to work with "struct block" variables.]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Sat, 24 Jan 2009 19:15:26 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8665#msg-8665</guid>
<title>Re: Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8665#msg-8665</link><description><![CDATA[ [<a href="http://www.cplusplus.com/reference/clibrary/cstdio/fwrite.html" rel="nofollow">www.cplusplus.com</a>]<br /><br />my advise would be to (really) learn C/C++ first before attempting to play with sourcecodes<br /><br />btw, the link you found is for matlab programming language: this is not going to help you in any ways for Wii programming<br /><br />finally, "http://www.google.com/" is a website link, it is not a file, I really don&#039;t know what you are trying to do but I don&#039;t need your sources to tell you are thinking things wrong<br /><br /><br />I thought I had to tell you ;-)]]></description>
<dc:creator>ekeeke</dc:creator>
<category>Coding</category><pubDate>Sat, 24 Jan 2009 17:50:58 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8658,8658#msg-8658</guid>
<title>Got network working!!! But can&#039;t do fwrite :(</title><link>http://forum.wiibrew.org/read.php?11,8658,8658#msg-8658</link><description><![CDATA[ I have had a good look at WiiEarth and have been able to extract the http and dns lib from it. I have set up an app which uses the http and dns lib from wiiearth to download [<a href="http://www.google.com/" rel="nofollow">www.google.com</a>].<br /><br />The good thing is that i can download the file (well i think i can) but now i want to save the contents of the variable which contains something that is from google.com into a file. I have gotten as far as<br /><br /><pre class="bbcode">
fopen("fat://google.txt", "w"); //File not created so set to w to create new file</pre><br />Now how would I do fwrite? This is obviously wrong:<br /><pre class="bbcode">
fwrite(file, "fat://google.txt"); //file contains the content of google.com</pre><br />I found that fwrite needs a minimum of two arguments (<a href="http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/fwrite.html&[url" rel="nofollow">http://www.mathworks.com/support/tech-notes/1600/1602.html</a>]source[/url])<br /><br />but how do i do fwrite with a variable of struct block:<br /><pre class="bbcode">
struct block file = downloadfile("http://www.google.com/");</pre><br /><br />If anything else is needed like purpose of app or entire source then just ask!<br /><br />Thx in advance (Firefox users will love you if you help, well kind of).]]></description>
<dc:creator>SteelSLasher</dc:creator>
<category>Coding</category><pubDate>Sat, 24 Jan 2009 14:23:39 +0100</pubDate></item>
</channel>
</rss>