Fix umpnpmgr build
[reactos.git] / rosapps / sysutils / dosfsck / common.h
1 /* common.h - Common functions */
2
3 # define MSDOS_FAT12 4084 /* maximum number of clusters in a 12 bit FAT */
4
5 #include "version.h"
6
7 #ifndef _COMMON_H
8 #define _COMMON_H
9
10 //void die(char *msg,...) __attribute((noreturn));
11 __declspec(noreturn) void die(char *msg,...);
12
13 /* Displays a prinf-style message and terminates the program. */
14
15 //void pdie(char *msg,...) __attribute((noreturn));
16 __declspec(noreturn) void pdie(char *msg,...);
17
18 /* Like die, but appends an error message according to the state of errno. */
19
20 void *alloc(int size);
21
22 /* mallocs SIZE bytes and returns a pointer to the data. Terminates the program
23 if malloc fails. */
24
25 void *qalloc(void **root,int size);
26
27 /* Like alloc, but registers the data area in a list described by ROOT. */
28
29 void qfree(void **root);
30
31 /* Deallocates all qalloc'ed data areas described by ROOT. */
32
33 //int min(int a,int b);
34
35 /* Returns the smaller integer value of a and b. */
36
37 char get_key(char *valid,char *prompt);
38
39 /* Displays PROMPT and waits for user input. Only characters in VALID are
40 accepted. Terminates the program on EOF. Returns the character. */
41
42 #endif