For starters, there is no need to call reverse.  Just use "%-2c" in
the sscanf format string for backwards endianness.  Secondly, while
you can't use "%*c",2 you _can_ use "%"+2+"c", if that is what you
need.  (Most headers have a fixed format where you know the sizes
beforehand though, meaning you can just do something like
'sscanf(fp->read(10), "%-4c%-2c%-2c%-2c", a, b, c, d)'...)

You can also take a look at ADT.Struct, which supports backwards
endians through the "Drow" and "Gnol" classes.
  • Re:... Stephen R. van den Berg
    • ... Tobias S. Josefowitz
      • ... Lance Dillon
        • ... Lance Dillon
          • ... Stephen R. van den Berg
      • ... Stephen R. van den Berg
    • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
      • ... Lance Dillon
        • ... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
          • ... Lance Dillon
  • lit... Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum
    • ... Martin Nilsson (Coppermist) @ Pike (-) developers forum

Reply via email to