mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 12:20:00 +01:00
Add some examples. (thanks to okozina)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@618 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
20
docs/examples/crypt_examples.h
Normal file
20
docs/examples/crypt_examples.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#define EX_STEP(step_nr, format, args...) do { \
|
||||
printf("STEP_%02d: Entering "format"... ", step_nr, ##args); \
|
||||
} while(0)
|
||||
|
||||
#define EX_FAIL(format, args...) do { \
|
||||
printf("FAIL\n"); \
|
||||
fprintf(stderr, "\t"format"\n", ##args); \
|
||||
} while(0)
|
||||
|
||||
#define EX_SUCCESS(format, args...) do { \
|
||||
printf("OK\n\t"format"\n", ##args); \
|
||||
} while(0)
|
||||
|
||||
#define EX_DELIM printf("-------------------------------\n")
|
||||
|
||||
#define EX_PRESS_ENTER(msg, args...) do { \
|
||||
printf(msg "\nPress <ENTER> to continue: ", ##args); \
|
||||
getc(stdin); \
|
||||
} while(0)
|
||||
|
||||
Reference in New Issue
Block a user