[prog] Reading data file
Tiera
tiera at comhem.se
Sat Jan 24 17:07:31 EST 2004
On Fri, Jan 23, 2004 at 03:09:33PM -0800, Daniel. wrote:
> >I downloaded the sourcecode for my version of sylpheed-claws and there it
> >looked like this instead:
>
> Great. The two lists match exactly.
Oh, I didn't understand that. Thanks for pointing that out.
> >But I don't know how to get the information out of the sylpheed_mark-file?
>
> If the problem is extracting individual flags from the 32-bit
> messageflags variable, you use a bitwise and. In bash I think this
> would look like
> let "REPLIEDFLAG = ($MSGFLAGS & 16)/16"
> let "FORWARDEDFLAG = ($MSGFLAGS & 32)/32"
> etc.
> You can omit the division if the flags only need to be zero and
> nonzero, rather than zero and one.
Yes, that was one of the problems.
> If the problem is something else, dunno.
The other problem right now is that I don't understand how to get the
32-bit messageflags from the file? I know how to read info line by
line from textfiles, but I don't understand how to read the file and
get the 32-bits from it? I don't understand the difference between
textfiles and binary files...
> -Daniel.
Thanks Daniel.
/Tiera
More information about the Programming
mailing list