I don't know how appropriate this question is. sorry before hand if it's not appropriate.
I've been working on an assignment, where the program through cygwin reads a file if it is .rle it will decode the *010X ...to 10 X's like so XXXXXXXXXX ...else if it is a .txt file with the ASCII art in it, it will encode it into 3 run-length ...*010X.
Every rle file begins with *R ...as a mark for the special characters it needs to look for. I need to use two .c files and .h file.
As of now i have no errors. But i'm stuck on the logic. In the header file ....i have defined a few things the main ones as so. Note the functions have been declared in there too...i just didn't post all of it.
In the .c main file ...it should read the file and distinguish between what it should call. Either the decoder or encoder depending on what the file begins with. file: rle.c ...works perfectly fine.Code:#define IND '*' #define MARK 'R' #define MIN_CHAR 3 #define MAX_CHAR 5
My problem is ...that when i try to decode, it does nothing. I'm not sure if this is even a good question to ask. have i miss understood the logic. can someone pm me or email me at email@example.com ...so i can show you the code. I don't wish to post it, incase the teacher thinks i copyed and pasted it off here. :S
And if this question and the fact that i'm not posting the code here isn't what i'm supposed to do...then i'm sorry. just ignore or delete this post if i've broken any rules.