diff options
author | Alon Levy <alevy@redhat.com> | 2010-11-25 11:19:45 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2010-12-09 13:36:19 +0200 |
commit | c8354e47fbfff68fb86e9dfdea174461ba5c59d2 (patch) | |
tree | 999c42d0b36910d1789b3d7fec2abb83b5552992 | |
parent | 0e7138a2d7fb954f1c2a83d68d90367a12dc6e66 (diff) |
libcaccard: coding style: replace DWORD and BYTE with uint32_t and uint8_t
-rw-r--r-- | mutex.h | 2 | ||||
-rw-r--r-- | passthru.c | 6 | ||||
-rw-r--r-- | vscclient.c | 10 |
3 files changed, 7 insertions, 11 deletions
@@ -35,7 +35,7 @@ typedef CONDITION_VARIABLE condition_t; #define CONDITION_WAIT(cond,mutex) \ SleepConditionVariableCS(&cond,&mutex,INFINTE) #define CONDITION_NOTIFY(cond) WakeConditionVariable(&cond) -typedef DWORD thread_t; +typedef uint32_t thread_t; typedef HANDLE thread_status_t; #define THREAD_CREATE(tid, func, arg) \ CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)func, arg, 0, &tid) @@ -20,7 +20,7 @@ struct VCardAppletPrivateStruct { char *reader_name; /* pcsc-lite parameters */ SCARDHANDLE hCard; - DWORD hProtocol; + uint32_t hProtocol; SCARD_IO_REQUEST *send_io; unsigned char atr[MAX_ATR_SIZE]; int atr_len; @@ -37,7 +37,7 @@ passthru_process_apdu(VCard *card, VCardAPDU *apdu, VCardResponse **response) { LONG rv; unsigned char buf[MAX_RESPONSE_LENGTH]; - DWORD len = MAX_RESPONSE_LENGTH; + uint32_t len = MAX_RESPONSE_LENGTH; VCardAppletPrivate *applet_private = NULL; SCARD_IO_REQUEST receive_io; @@ -142,7 +142,7 @@ passthru_get_reader_name(VReader *reader) char *reader_list = NULL; char *reader_entry = NULL; char *reader_match = NULL; - DWORD reader_string_length; + uint32_t reader_string_length; VCardStatus status; LONG rv; diff --git a/vscclient.c b/vscclient.c index 2d7f614..ee539c1 100644 --- a/vscclient.c +++ b/vscclient.c @@ -18,17 +18,13 @@ #include "mutex.h" - -typedef unsigned char BYTE; -typedef unsigned long LONG; - int verbose = 0; int sock; void PrintByteArray ( - BYTE *arrBytes, + uint8_t *arrBytes, unsigned int nSize ) { int i; @@ -445,8 +441,8 @@ main ( LONG rv; int dwSendLength; int dwRecvLength; - BYTE pbRecvBuffer[APDUBufSize]; - BYTE pbSendBuffer[APDUBufSize]; + uint8_t pbRecvBuffer[APDUBufSize]; + uint8_t pbSendBuffer[APDUBufSize]; VReaderStatus reader_status; VReader *reader = NULL; VCardEmulOptions *command_line_options = NULL; |