I can read the content of a file using the FRead Function of AmigaDOS. I can use two while cycle to read two file at the same time, but what I would like to do is to compare the content of these two files..
i was looking through sdk and I saw two functions: ParsePatternNoCase() and MatchPatternNoCase(). Have I to use both functions to compare the content of two files?
First ParsePatternNoCase and then MatchPatternNoCase? is it right?
@Nube.
No, not exactly. Those functions are for doing pattern matching. If you were searching for a particular pattern such as #?Amiga#? then you'd run it through those functions to get a match.
Utility.library has Stricmp() amd Strnicmp() for case insensitive string comparison.
But you could just as easily use the C library functions.
thanks for the information, I don't know much about amigaos (developer side) and I ignored utility library at all.. Thanks!
If the intention is just to compare the two files to see if they are byte for byte identical. Then the simplest way to achieve this would be using the memcmp() function.
It returns zero if the compared buffers are identical and non-zero otherwise.