Mercurial > hg > sidinfo
changeset 28:6240788fe172
Cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 25 Sep 2014 05:32:42 +0300 |
parents | 4dd463eebb74 |
children | d4ec69beb160 |
files | sidinfo.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/sidinfo.c Thu Sep 25 04:01:22 2014 +0300 +++ b/sidinfo.c Thu Sep 25 05:32:42 2014 +0300 @@ -8,11 +8,13 @@ #include "th_string.h" #include "th_crypto.h" +// Some constants #define PSID_MAGIC_LEN 4 #define PSID_STR_LEN 32 #define PSID_BUFFER_SIZE (1024 * 16) +// Flags for various information fields enum { PSF_NONE = 0, @@ -62,14 +64,15 @@ { PSF_SID_COPYRIGHT , "Copyright" , NULL }, { PSF_HASH , "Hash" , NULL }, { PSF_FILENAME , "Filename" , NULL }, + + { PSF_ALL , "All" , NULL }, }; const int noptPSFlags = sizeof(optPSFlags) / sizeof(optPSFlags[0]); -/* Options - */ +// Option variables BOOL optParsable = FALSE, optNoNamePrefix = FALSE, optHexadecimal = FALSE; @@ -77,8 +80,7 @@ int optNFiles = 0; -/* Arguments - */ +// Define option arguments static optarg_t optList[] = { { 0, '?', "help", "Show this help", OPT_NONE },