fat: Make mangle behavior similar to the standard one
[profile/ivi/syslinux.git] / dos / mystuff.h
1 #ifndef MYSTUFF_H
2 #define MYSTUFF_H
3
4 #include <inttypes.h>
5
6 #define NULL ((void *)0)
7
8 unsigned int skip_atou(const char **s);
9 unsigned int atou(const char *s);
10
11 static inline int isdigit(int ch)
12 {
13     return (ch >= '0') && (ch <= '9');
14 }
15
16 struct diskio {
17     uint32_t startsector;
18     uint16_t sectors;
19     uint16_t bufoffs, bufseg;
20 } __attribute__ ((packed));
21 int int25_read_sector(unsigned char drive, struct diskio *dio);
22 int int26_write_sector(unsigned char drive, struct diskio *dio);
23
24 #endif /* MYSTUFF_H */