[File] pstring docs

Christos Zoulas christos at zoulas.com
Mon Jan 21 14:57:14 UTC 2019


On Jan 20, 11:21pm, yalhcru at gmail.com (B Watson) wrote:
-- Subject: [File] pstring docs

| For file-5.35, the documentation for pstring in the man and info pages says:
| 
| H  A 4 byte big endian length.
| h  A 2 byte little endian length.
| L  A 4 byte big endian length.
| l  A 2 byte little endian length.

The file.h header says:

#define CHAR_PSTRING_2_BE                       'H'
#define CHAR_PSTRING_2_LE                       'h'
#define CHAR_PSTRING_4_BE                       'L'
#define CHAR_PSTRING_4_LE                       'l'

| ...so H and L are both 4-byte big endian, and h and l are both 2-byte
| little. Correct me if I'm wrong, but this seems like it can't be
| right. Not sure which is supposed to be which, though.
| 
| In my testing, it looks like the lowercase versions are 4-byte and the
| uppercase are 2-byte. "l" works as 4-byte little endian, for me. Is this
| how it's supposed to work?

I have fixed it, thanks!

christos


More information about the File mailing list