[Pcsclite-cvs-commit] r2152 - in trunk/Drivers/ccid/src: . openct
towitoko
Ludovic Rousseau
rousseau at costa.debian.org
Wed Sep 6 22:06:59 CEST 2006
Author: rousseau
Date: 2006-09-06 20:06:58 +0000 (Wed, 06 Sep 2006)
New Revision: 2152
Modified:
trunk/Drivers/ccid/src/ccid.c
trunk/Drivers/ccid/src/ccid.h
trunk/Drivers/ccid/src/ccid_serial.c
trunk/Drivers/ccid/src/ccid_usb.c
trunk/Drivers/ccid/src/commands.c
trunk/Drivers/ccid/src/debug.h
trunk/Drivers/ccid/src/defs.h
trunk/Drivers/ccid/src/ifdhandler.c
trunk/Drivers/ccid/src/openct/proto-t1.c
trunk/Drivers/ccid/src/parse.c
trunk/Drivers/ccid/src/towitoko/atr.c
trunk/Drivers/ccid/src/towitoko/pps.c
Log:
remove trailing spaces at end of lines
Modified: trunk/Drivers/ccid/src/ccid.c
===================================================================
--- trunk/Drivers/ccid/src/ccid.c 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/ccid.c 2006-09-06 20:06:58 UTC (rev 2152)
@@ -331,7 +331,7 @@
case 0xFB:
text = "Hardware error";
break;
-
+
case 0xFC:
text = "Overrun error";
break;
Modified: trunk/Drivers/ccid/src/ccid.h
===================================================================
--- trunk/Drivers/ccid/src/ccid.h 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/ccid.h 2006-09-06 20:06:58 UTC (rev 2152)
@@ -78,7 +78,7 @@
* The array of data rates supported by the reader
*/
unsigned int *arrayOfSupportedDataRates;
-
+
/*
* Read communication port timeout
* value is seconds
Modified: trunk/Drivers/ccid/src/ccid_serial.c
===================================================================
--- trunk/Drivers/ccid/src/ccid_serial.c 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/ccid_serial.c 2006-09-06 20:06:58 UTC (rev 2152)
@@ -3,7 +3,7 @@
* Copyright (C) 2001-2004 Ludovic Rousseau <ludovic.rousseau at free.fr>
*
* Thanks to Niki W. Waibel <niki.waibel at gmx.net> for a prototype version
- *
+ *
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
@@ -165,7 +165,7 @@
/*****************************************************************************
- *
+ *
* WriteSerial: Send bytes to the card reader
*
*****************************************************************************/
@@ -214,7 +214,7 @@
/*****************************************************************************
- *
+ *
* ReadSerial: Receive bytes from the card reader
*
*****************************************************************************/
@@ -242,7 +242,7 @@
goto sync;
if (c >= 0x80)
- {
+ {
DEBUG_COMM2("time request: 0x%02X", c);
goto start;
}
@@ -338,7 +338,7 @@
/*****************************************************************************
- *
+ *
* get_bytes: get n bytes
*
*****************************************************************************/
@@ -392,7 +392,7 @@
/*****************************************************************************
- *
+ *
* ReadChunk: read a minimum number of bytes
*
*****************************************************************************/
@@ -451,7 +451,7 @@
/*****************************************************************************
- *
+ *
* OpenSerial: open the port
*
*****************************************************************************/
@@ -462,7 +462,7 @@
DEBUG_COMM3("Reader index: %X, Channel: %d", reader_index, channel);
/*
- * Conversion of old-style ifd-hanler 1.0 CHANNELID
+ * Conversion of old-style ifd-hanler 1.0 CHANNELID
*/
if (channel == 0x0103F8)
channel = 1;
@@ -488,8 +488,8 @@
} /* OpenSerial */
/*****************************************************************************
- *
- * set_ccid_descriptor: init ccid descriptor
+ *
+ * set_ccid_descriptor: init ccid descriptor
* depending on reader type specified in device.
*
* return: STATUS_UNSUCCESSFUL,
@@ -506,7 +506,7 @@
static int previous_reader_index = -1;
readerID = GEMPCTWIN;
- if (0 == strcasecmp(reader_name,"GemCorePOSPro"))
+ if (0 == strcasecmp(reader_name,"GemCorePOSPro"))
readerID = GEMCOREPOSPRO;
else if (0 == strcasecmp(reader_name,"GemCoreSIMPro"))
readerID = GEMCORESIMPRO;
@@ -625,7 +625,7 @@
/*****************************************************************************
- *
+ *
* OpenSerialByName: open the port
*
*****************************************************************************/
@@ -781,7 +781,7 @@
/*****************************************************************************
- *
+ *
* CloseSerial: close the port
*
*****************************************************************************/
Modified: trunk/Drivers/ccid/src/ccid_usb.c
===================================================================
--- trunk/Drivers/ccid/src/ccid_usb.c 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/ccid_usb.c 2006-09-06 20:06:58 UTC (rev 2152)
@@ -24,7 +24,7 @@
#define __CCID_USB__
#include <stdio.h>
-#include <string.h>
+#include <string.h>
#include <errno.h>
# ifdef S_SPLINT_S
# include <sys/types.h>
@@ -372,7 +372,7 @@
DEBUG_CRITICAL3("Can't find a CCID interface on %s/%s",
bus->dirname, dev->filename);
return STATUS_UNSUCCESSFUL;
- }
+ }
if (usb_interface->altsetting->extralen != 54)
{
@@ -622,7 +622,7 @@
int i;
int bEndpointAddress;
struct usb_interface *usb_interface = get_ccid_usb_interface(dev);
-
+
/*
* 3 Endpoints maximum: Interrupt In, Bulk In, Bulk Out
*/
@@ -651,7 +651,7 @@
****************************************************************************/
/*@null@*/ EXTERNAL struct usb_interface * get_ccid_usb_interface(struct usb_device *dev)
{
- struct usb_interface *usb_interface = NULL;
+ struct usb_interface *usb_interface = NULL;
int i;
/* if multiple interfaces use the first one with CCID class type */
Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/commands.c 2006-09-06 20:06:58 UTC (rev 2152)
@@ -236,9 +236,9 @@
(void *)(TxBuffer + offsetof(PIN_VERIFY_STRUCTURE, abData)),
TxLength - offsetof(PIN_VERIFY_STRUCTURE, abData));
- /* Create T=1 block */
+ /* Create T=1 block */
ret = t1_build(&((get_ccid_slot(reader_index))->t1),
- sdata, 0, T1_I_BLOCK, &sbuf, NULL);
+ sdata, 0, T1_I_BLOCK, &sbuf, NULL);
/* Increment the sequence numbers */
get_ccid_slot(reader_index)->t1.ns ^= 1;
@@ -446,9 +446,9 @@
(void *)(TxBuffer + offsetof(PIN_MODIFY_STRUCTURE, abData)),
TxLength - offsetof(PIN_MODIFY_STRUCTURE, abData));
- /* Create T=1 block */
+ /* Create T=1 block */
ret = t1_build(&((get_ccid_slot(reader_index))->t1),
- sdata, 0, T1_I_BLOCK, &sbuf, NULL);
+ sdata, 0, T1_I_BLOCK, &sbuf, NULL);
/* Increment the sequence numbers */
get_ccid_slot(reader_index)->t1.ns ^= 1;
Modified: trunk/Drivers/ccid/src/debug.h
===================================================================
--- trunk/Drivers/ccid/src/debug.h 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/debug.h 2006-09-06 20:06:58 UTC (rev 2152)
@@ -28,14 +28,14 @@
* DEBUG_CRITICAL2("text: %d", 1234);
* log "text: 1234" if (DEBUG_LEVEL_CRITICAL & DEBUG_LEVEL_CRITICAL) is TRUE
* the format string can be anything printf() can understand
- *
+ *
* same thing for DEBUG_INFO, DEBUG_COMM and DEBUG_PERIODIC
*
* DEBUG_XXD(msg, buffer, size);
* log a dump of buffer if (LogLevel & DEBUG_LEVEL_COMM) is TRUE
*
*/
-
+
#ifndef _GCDEBUG_H_
#define _GCDEBUG_H_
Modified: trunk/Drivers/ccid/src/defs.h
===================================================================
--- trunk/Drivers/ccid/src/defs.h 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/defs.h 2006-09-06 20:06:58 UTC (rev 2152)
@@ -53,7 +53,7 @@
STATUS_SECONDARY_SLOT = 0xFF
} status_t;
-/* Powerflag (used to detect quick insertion removals unnoticed by the
+/* Powerflag (used to detect quick insertion removals unnoticed by the
* resource manager)Initial value */
#define POWERFLAGS_RAZ 0x00
/* Flag set when a power up has been requested */
Modified: trunk/Drivers/ccid/src/ifdhandler.c
===================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/ifdhandler.c 2006-09-06 20:06:58 UTC (rev 2152)
@@ -60,7 +60,7 @@
static void init_driver(void);
static void extra_egt(ATR_t *atr, _ccid_descriptor *ccid_desc, DWORD Protocol);
static char find_baud_rate(unsigned int baudrate, unsigned int *list);
-static unsigned int T0_card_timeout(double f, double d, int TC1, int TC2,
+static unsigned int T0_card_timeout(double f, double d, int TC1, int TC2,
int clock_frequency);
static unsigned int T1_card_timeout(double f, double d, int TC1, int BWI,
int CWI, int clock_frequency);
@@ -926,7 +926,7 @@
EXTERNAL RESPONSECODE IFDHControl(DWORD Lun, DWORD dwControlCode,
PUCHAR TxBuffer, DWORD TxLength, PUCHAR RxBuffer, DWORD RxLength,
- PDWORD pdwBytesReturned)
+ PDWORD pdwBytesReturned)
{
/*
* This function performs a data exchange with the reader (not the
@@ -973,7 +973,7 @@
}
/* Implement the PC/SC v2.1.2 Part 10 IOCTL mechanism */
-
+
/* Query for features */
if (CM_IOCTL_GET_FEATURE_REQUEST == dwControlCode)
{
@@ -995,7 +995,7 @@
pcsc_tlv++;
iBytesReturned += sizeof(PCSC_TLV_STRUCTURE);
}
-
+
if (get_ccid_descriptor(reader_index) -> bPINSupport
& CCID_CLASS_PIN_MODIFY)
{
@@ -1147,7 +1147,7 @@
/* simulate a card absent */
res[0] = 0;
}
-
+
if (0x01 == res[0])
return_value = IFD_ICC_PRESENT;
else
@@ -1291,7 +1291,7 @@
for (i=2; i<ATR_MAX_PROTOCOLS; i++)
{
/* CWI >= 2 ? */
- if (atr->ib[i][ATR_INTERFACE_BYTE_TB].present &&
+ if (atr->ib[i][ATR_INTERFACE_BYTE_TB].present &&
((atr->ib[i][ATR_INTERFACE_BYTE_TB].value & 0x0F) >= 2))
{
/* Init TC1 */
@@ -1356,7 +1356,7 @@
* Terminal: Smart card:
* 5 bytes header cmd ->
* <- Procedure byte + 256 data bytes + SW1-SW2
- * = 5 EGT + 1 WWT + 259 WWT
+ * = 5 EGT + 1 WWT + 259 WWT
*/
/* clock_frequency is in kHz so the times are in milliseconds and not
@@ -1402,11 +1402,11 @@
/* Timeout applied on ISO in + ISO out card exchange
*
* Timeout is the sum of:
- * - ISO in delay between leading edge of the first character sent by the
+ * - ISO in delay between leading edge of the first character sent by the
* interface device and the last one (NAD PCB LN APDU CKS) = 260 EGT,
* - delay between ISO in and ISO out = BWT,
- * - ISO out delay between leading edge of the first character sent by the
- * card and the last one (NAD PCB LN DATAS CKS) = 260 CWT.
+ * - ISO out delay between leading edge of the first character sent by the
+ * card and the last one (NAD PCB LN DATAS CKS) = 260 CWT.
*/
/* clock_frequency is in kHz so the times are in milliseconds and not
Modified: trunk/Drivers/ccid/src/openct/proto-t1.c
===================================================================
--- trunk/Drivers/ccid/src/openct/proto-t1.c 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/openct/proto-t1.c 2006-09-06 20:06:58 UTC (rev 2152)
@@ -456,7 +456,7 @@
/* ISO 7816-3 Rule 9 */
DEBUG_CRITICAL("abort requested");
goto resync;
-
+
case T1_S_IFS:
if (sdata[LEN] != 1)
{
@@ -468,7 +468,7 @@
}
DEBUG_CRITICAL2("CT sent S-block with ifs=%u", sdata[DATA]);
- if (sdata[DATA] == 0)
+ if (sdata[DATA] == 0)
goto resync;
t1->ifsc = sdata[DATA];
ct_buf_putc(&tbuf, sdata[DATA]);
@@ -657,12 +657,12 @@
unsigned int rmax_int;
DEBUG_XXD("sending: ", block, slen);
-
- ccid_desc = get_ccid_descriptor(t1->lun);
+
+ ccid_desc = get_ccid_descriptor(t1->lun);
oldReadTimeout = ccid_desc->readTimeout;
if (t1->wtx > 1)
- {
+ {
/* set the new temporary timeout at WTX card request */
ccid_desc->readTimeout *= t1->wtx;
DEBUG_INFO2("New timeout at WTX request: %d sec",
Modified: trunk/Drivers/ccid/src/parse.c
===================================================================
--- trunk/Drivers/ccid/src/parse.c 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/parse.c 2006-09-06 20:06:58 UTC (rev 2152)
@@ -22,7 +22,7 @@
*/
#include <stdio.h>
-#include <string.h>
+#include <string.h>
# ifdef S_SPLINT_S
# include <sys/types.h>
# endif
@@ -105,7 +105,7 @@
fprintf(stderr, "Can't find a CCID interface on %s/%s\n",
bus->dirname, dev->filename);
continue;
- }
+ }
ccid_parse_interface_descriptor(dev_handle, dev);
usb_close(dev_handle);
@@ -149,15 +149,15 @@
dev->descriptor.bcdDevice >> 8, dev->descriptor.bcdDevice & 0xFF);
usb_interface = get_ccid_usb_interface(dev)->altsetting;
-
+
printf(" bLength: %d\n", usb_interface->bLength);
-
+
printf(" bDescriptorType: %d\n", usb_interface->bDescriptorType);
-
+
printf(" bInterfaceNumber: %d\n", usb_interface->bInterfaceNumber);
-
+
printf(" bAlternateSetting: %d\n", usb_interface->bAlternateSetting);
-
+
printf(" bNumEndpoints: %d\n", usb_interface->bNumEndpoints);
printf(" bInterfaceClass: 0x%02X", usb_interface->bInterfaceClass);
@@ -171,7 +171,7 @@
else
printf(" Class is 0xFF (proprietary)\n");
}
-
+
printf(" bInterfaceSubClass: %d\n", usb_interface->bInterfaceSubClass);
if (usb_interface->bInterfaceSubClass)
printf(" UNSUPPORTED SubClass\n");
Modified: trunk/Drivers/ccid/src/towitoko/atr.c
===================================================================
--- trunk/Drivers/ccid/src/towitoko/atr.c 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/towitoko/atr.c 2006-09-06 20:06:58 UTC (rev 2152)
@@ -25,14 +25,14 @@
#include <string.h>
#include "debug.h"
-/*
+/*
* Not exported variables definition
*/
static unsigned
-atr_num_ib_table[16] =
-{
- 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4
+atr_num_ib_table[16] =
+{
+ 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4
};
/*
@@ -40,24 +40,24 @@
*/
static unsigned
-atr_f_table[16] =
-{
- 372, 372, 558, 744, 1116, 1488, 1860, 0, 0, 512, 768, 1024, 1536, 2048, 0, 0
+atr_f_table[16] =
+{
+ 372, 372, 558, 744, 1116, 1488, 1860, 0, 0, 512, 768, 1024, 1536, 2048, 0, 0
};
-static unsigned
-atr_d_table[16] =
-{
- 0, 1, 2, 4, 8, 16, 32, 64, 12, 20, 0, 0, 0, 0, 0, 0
+static unsigned
+atr_d_table[16] =
+{
+ 0, 1, 2, 4, 8, 16, 32, 64, 12, 20, 0, 0, 0, 0, 0, 0
};
-static unsigned
-atr_i_table[4] =
-{
- 25, 50, 100, 0
+static unsigned
+atr_i_table[4] =
+{
+ 25, 50, 100, 0
};
-/*
+/*
* Exported funcions definition
*/
Modified: trunk/Drivers/ccid/src/towitoko/pps.c
===================================================================
--- trunk/Drivers/ccid/src/towitoko/pps.c 2006-09-06 20:02:47 UTC (rev 2151)
+++ trunk/Drivers/ccid/src/towitoko/pps.c 2006-09-06 20:06:58 UTC (rev 2152)
@@ -1,7 +1,7 @@
/*
pps.c
Protocol Parameters Selection
-
+
This file is part of the Unix driver for Towitoko smartcard readers
Copyright (C) 2000 2001 Carlos Prados <cprados at yahoo.com>
More information about the Pcsclite-cvs-commit
mailing list