Ohh. Right. The problem is now fixed. I didn't try both changes in conjunction. Again, a simple answer. Thanks a lot!
How might I lock a topic?
Type: Posts; User: Flotonic
Ohh. Right. The problem is now fixed. I didn't try both changes in conjunction. Again, a simple answer. Thanks a lot!
How might I lock a topic?
I optimized the code earlier today and am now getting the same permanent loop problem on Linux, same for Windows. The good part is that the data ripped from the file on each system is one hundred...
Salem:
I'll post the general bits for file reading here for you. If you want the whole source code, I can create a PasteBin entry for you.
char portfromentry[145],porttoentry[145];
int...
Anduril462: Wow, thanks! I didn't know about that. I haven't used fflush(stdin); since I made simpler programs on Windows, but that is very useful to know.
Stahta01: I have them all stored in...
I'm testing my code. It works flawlessly for me. For people on Windows, though, after so many bytes are read, the data starts getting screwy and eventually just becomes FF FF FF FF Bytes (NULL). I'm...
I just had a Windows user try opening the file and copying it to and empty, fresh, new one. They still get the errors, even though the copy is 100% clean and not modified from what is found in the...
I'm re-downloading the files and doing this with perfectly clean data each time. Besides, when a file is opened in binary mode, Windows should be told to treat it as binary. Ohh well.
Previously, they were worked with in a Hex Editor, so they were most likely in Binary Mode at that time, too. The data that the program is reading is straight from video game files, of course.
...
EVOEx: You're not understanding at all. Of course the files aren't the same on both Linux and Windows. I've already stated that the Windows data is BROKEN and that I'm trying to find a way to fix it....
Both the source code and the files being read/written to are the same on both systems. Yes. There shouldn't be a reason there can't be some sort of repair, though.
Ohh! Now I see it. :P Thank ya! The problem now is modifying the code or doing something so Windows doesn't do said conversions. Because I'm still relatively new and still, in fact, have the...
"Pseudo" means fake. That was just fake bytes that I threw together in order to better illustrate the problem and in a smaller amount of space.
The data file gets there when the program is ran. It...
I'm referring to when executing the program itself. It copies a certain block of data from a file to a new file. (The program was put on Windows by compiling under Windows. Very simple.)
After...
displaylist=fopen("temp1.zmuffin", "r+");
So I don't think I did. Mind elaborating about this "binary mode?"
EDIT:
Now binary mode is used. Example:
portfrom=fopen(portfromentry,"r+b");
Currently, in Linux, the for() loop I've written gives me no problems. However, when Windows users try working with it, the data get offset after so many times going around and they get thrown into...
Just finished giving fwrite(); a shot. I get "passing argument 1 of fwrite makes pointer from integer without a cast." I think that fwrite is made for putting down down things declared with "char,"...
Salem and kmess were more understanding of how the question was asking about binary stuff, not text. Thanks for the tips!
First, two bytes are read and combined at a time from a file, so 7F FF (two separate values) becomes one value, 7FFF. That part has already been done. However, I'm looking for a means of injecting...
I never did think about doing such a thing. Thanks, everyone! :D
Instead of this:
case 'r':
{ Mufftastic code. }
case 'R':
{ Same mufftastic code. }
I need something that combines them, like this (even though this code doesn't work):
case 'r' || 'R':...
Example:
Input = File to get data from.
Let's say that the file is only one line. The first six bytes would be grabbed, in sets of two.
XX XX YY YY ZZ ZZ
For example, 00 00 FF 7F 50 00....
After about two or more hours of experimenting and going crazy trying to find an answer, I've decided to bring the problem here, where there are many people that know what they're doing.
I'm...
Thanks for the support! The program works flawlessly now!
I still get the error of a "digit overflow" for some of them:
02 ff 01 ff 0009 0350 fffffeae 10012 0000 0000
^ ^
However, your advice worked...
I'm writing a program to do some manipulation to user inputted variables and redisplay it. Nothing difficult. However, the output isn't formatted the way it should be, although it's correct. With...