]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - include/iso9660.h
1 #ifndef UTIL_LINUX_ISO_H
2 #define UTIL_LINUX_ISO_H
8 static inline int isonum_721(unsigned char *p
)
11 | ((p
[1] & 0xff) << 8));
14 static inline int isonum_722(unsigned char *p
)
17 | ((p
[0] & 0xff) << 8));
20 static inline int isonum_723(unsigned char *p
, bool check_match
)
22 int le
= isonum_721(p
);
23 int be
= isonum_722(p
+ 2);
25 if (check_match
&& le
!= be
)
26 /* translation is useless */
27 warnx("723error: le=%d be=%d", le
, be
);
31 static inline int isonum_731(unsigned char *p
)
34 | ((p
[1] & 0xff) << 8)
35 | ((p
[2] & 0xff) << 16)
36 | ((p
[3] & 0xff) << 24));
39 static inline int isonum_732(unsigned char *p
)
42 | ((p
[2] & 0xff) << 8)
43 | ((p
[1] & 0xff) << 16)
44 | ((p
[0] & 0xff) << 24));
47 static inline int isonum_733(unsigned char *p
, bool check_match
)
49 int le
= isonum_731(p
);
50 int be
= isonum_732(p
+ 4);
52 if (check_match
&& le
!= be
)
53 /* translation is useless */
54 warnx("733error: le=%d be=%d", le
, be
);