- getopt cleanup from aj
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@988 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
632dc7dfc8
commit
1e1eec0d8a
|
@ -33,12 +33,6 @@
|
|||
#include <opensc/opensc.h>
|
||||
#include "util.h"
|
||||
|
||||
#define OPT_CHANGE_PIN 0x100
|
||||
#define OPT_LIST_PINS 0x101
|
||||
#define OPT_READER 0x102
|
||||
#define OPT_PIN_ID 0x103
|
||||
#define OPT_NO_CACHE 0x104
|
||||
|
||||
const char *app_name = "opensc-tool";
|
||||
|
||||
int opt_reader = -1, opt_no_cache = 0, opt_debug = 0, opt_wait = 0;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#define NO_MECHANISM ((CK_MECHANISM_TYPE) -1)
|
||||
|
||||
enum {
|
||||
OPT_MODULE,
|
||||
OPT_MODULE = 0x100,
|
||||
OPT_SLOT,
|
||||
};
|
||||
|
||||
|
|
|
@ -45,9 +45,11 @@ char * opt_pincode = NULL, * opt_key_id = NULL;
|
|||
char * opt_input = NULL, * opt_output = NULL;
|
||||
int opt_crypt_flags = 0;
|
||||
|
||||
#define OPT_SHA1 0x101
|
||||
#define OPT_MD5 0x102
|
||||
#define OPT_PKCS1 0x103
|
||||
enum {
|
||||
OPT_SHA1 = 0x100,
|
||||
OPT_MD5,
|
||||
OPT_PKCS1,
|
||||
};
|
||||
|
||||
const struct option options[] = {
|
||||
{ "sign", 0, 0, 's' },
|
||||
|
|
|
@ -37,13 +37,15 @@ char * opt_newpin = NULL;
|
|||
|
||||
int quiet = 0;
|
||||
|
||||
#define OPT_CHANGE_PIN 0x100
|
||||
#define OPT_LIST_PINS 0x101
|
||||
#define OPT_READER 0x102
|
||||
#define OPT_PIN_ID 0x103
|
||||
#define OPT_NO_CACHE 0x104
|
||||
#define OPT_LIST_PUB 0x105
|
||||
#define OPT_READ_PUB 0x106
|
||||
enum {
|
||||
OPT_CHANGE_PIN = 0x100,
|
||||
OPT_LIST_PINS,
|
||||
OPT_READER,
|
||||
OPT_PIN_ID,
|
||||
OPT_NO_CACHE,
|
||||
OPT_LIST_PUB,
|
||||
OPT_READ_PUB,
|
||||
};
|
||||
|
||||
#define NELEMENTS(x) (sizeof(x)/sizeof((x)[0]))
|
||||
|
||||
|
|
Loading…
Reference in New Issue