Add some examples. (thanks to okozina)
[platform/upstream/cryptsetup.git] / docs / examples / crypt_examples.h
1 #define EX_STEP(step_nr, format, args...)       do { \
2                                                         printf("STEP_%02d: Entering "format"... ", step_nr, ##args); \
3                                                 } while(0)
4
5 #define EX_FAIL(format, args...)        do { \
6                                                 printf("FAIL\n"); \
7                                                 fprintf(stderr, "\t"format"\n", ##args); \
8                                         } while(0)
9
10 #define EX_SUCCESS(format, args...)     do { \
11                                                 printf("OK\n\t"format"\n", ##args); \
12                                         } while(0)
13
14 #define EX_DELIM        printf("-------------------------------\n")
15
16 #define EX_PRESS_ENTER(msg, args...)    do { \
17                                                 printf(msg "\nPress <ENTER> to continue: ", ##args); \
18                                                 getc(stdin); \
19                                         } while(0)
20