mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
- use enum for the OPs as suggested by vda. No obj-code changes.
This commit is contained in:
parent
f73cac8d3d
commit
99003b8a87
@ -85,19 +85,22 @@ int dd_main(int argc, char **argv)
|
|||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
#define OP_bs 0 + 1
|
enum {
|
||||||
#define OP_count OP_bs + 1
|
OP_bs = 1,
|
||||||
#define OP_seek OP_count + 1
|
OP_count,
|
||||||
#define OP_skip OP_seek + 1
|
OP_seek,
|
||||||
#define OP_if OP_skip + 1
|
OP_skip,
|
||||||
#define OP_of OP_if + 1
|
OP_if,
|
||||||
#define OP_ibs OP_of + ENABLE_FEATURE_DD_IBS_OBS
|
OP_of,
|
||||||
#define OP_obs OP_ibs + ENABLE_FEATURE_DD_IBS_OBS
|
USE_FEATURE_DD_IBS_OBS(
|
||||||
#define OP_conv OP_obs + ENABLE_FEATURE_DD_IBS_OBS
|
OP_ibs,
|
||||||
#define OP_conv_notrunc OP_conv + ENABLE_FEATURE_DD_IBS_OBS
|
OP_obs,
|
||||||
#define OP_conv_sync OP_conv_notrunc + ENABLE_FEATURE_DD_IBS_OBS
|
OP_conv,
|
||||||
#define OP_conv_noerror OP_conv_sync + ENABLE_FEATURE_DD_IBS_OBS
|
OP_conv_notrunc,
|
||||||
|
OP_conv_sync,
|
||||||
|
OP_conv_noerror,
|
||||||
|
)
|
||||||
|
};
|
||||||
int flags = trunc_flag;
|
int flags = trunc_flag;
|
||||||
size_t oc = 0, ibs = 512, obs = 512;
|
size_t oc = 0, ibs = 512, obs = 512;
|
||||||
ssize_t n, w;
|
ssize_t n, w;
|
||||||
@ -117,7 +120,8 @@ int dd_main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (n = 1; n < argc; n++) {
|
for (n = 1; n < argc; n++) {
|
||||||
smalluint key_len, what;
|
smalluint key_len;
|
||||||
|
smalluint what;
|
||||||
char *key;
|
char *key;
|
||||||
char *arg = argv[n];
|
char *arg = argv[n];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user