Mercurial > msvpvf
annotate include/common.h @ 85:1acd477da42f
posix: improvements
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Mon, 17 Jun 2024 21:18:37 -0400 |
parents | 8f90d5addda9 |
children |
rev | line source |
---|---|
79
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
1 #ifndef msvpvf_common_h |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
2 #define msvpvf_common_h |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
3 |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
4 #include <stdio.h> |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
5 #include <stdint.h> |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
6 |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
7 #ifndef ARRAYSIZE |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
8 #define ARRAYSIZE(x) \ |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
9 (sizeof(x)/sizeof((x)[0])) |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
10 #endif |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
11 |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
12 enum types { |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
13 TYPES_UNKNOWN = 0, |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
14 TYPES_VF, |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
15 TYPES_VEG |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
16 }; |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
17 |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
18 int set_file_information(FILE* target, uint8_t version, enum types type); |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
19 int get_file_information(FILE* input, uint8_t* version, enum types* type); |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
20 |
8f90d5addda9
*: refactor... basically everything!
Paper <paper@paper.us.eu.org>
parents:
58
diff
changeset
|
21 #endif /* msvpvf_common_h */ |