ok then.this belongs on a blog on your own forum
Have people ever heard of innovation and integrity ?where people who are actually interested can follow your wandering thoughts.
ok then.this belongs on a blog on your own forum
Have people ever heard of innovation and integrity ?where people who are actually interested can follow your wandering thoughts.
"without goto we would be wtf'd"
What happens if the input file doesn't fit into a char array of size 1000000 and why read the entire file into memory?
Also it would be nice to check that calls to fopen() succeed before reading from the file and then call fclose() after you're finished with it
I have not had a problem with the program size yet.What happens if the input file doesn't fit into a char array of size 1000000 and why read the entire file into memory?
When importing files i have definitely come across size issues.
I built it awhile ago and it could use some improvements.
I thought that i closed anything i opened...Also it would be nice to check that calls to fopen() succeed before reading from the file and then call fclose() after you're finished with it
"without goto we would be wtf'd"
In the function where you read the entire file into a global array, you open a file (without checking that it was actually opened) and then proceed to read the file (using fgets into a 256 char buffer and adding what's read to the global) and when finished not close the file. As far as I can see anyway.
Update: v5.1
I closed the file, thank you.call fclose() after you're finished with it
"without goto we would be wtf'd"
When you split things up using strtok, you store the results in global variables. I've tried to think of why this might be a good idea but I can't come up with a good reason. What's the reasoning behind having that kind of stuff as global variables?
I think what we'll do when you share the source code is rewrite a lot of this. The functions that trim whitespace seem ok, but main() is way too long. We could split it up a bit I think.
I think it is just a habit i have of using globals.What's the reasoning behind having that kind of stuff as global variables?
That is understandable. I still have not gone through and re wrote it myself to make things "better". So that it is not exactly streamlined and sort of messy as i have gone through and changed things.rewrite a lot of this.
"without goto we would be wtf'd"
Thank you for taking the time to look at HyperC.
Any ideas are welcome and appreciated.
"without goto we would be wtf'd"