[Pcsclite-cvs-commit] r444 - /trunk/muscleTool/muscleTool.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Fri Nov 13 09:33:58 UTC 2009
Author: rousseau
Date: Fri Nov 13 09:33:58 2009
New Revision: 444
URL: http://svn.debian.org/wsvn/muscleapps/?sc=1&rev=444
Log:
remove or #ifdef VERSION2 unused functions
Modified:
trunk/muscleTool/muscleTool.c
Modified: trunk/muscleTool/muscleTool.c
URL: http://svn.debian.org/wsvn/muscleapps/trunk/muscleTool/muscleTool.c?rev=444&op=diff
==============================================================================
--- trunk/muscleTool/muscleTool.c (original)
+++ trunk/muscleTool/muscleTool.c Fri Nov 13 09:33:58 2009
@@ -47,7 +47,6 @@
MSCString connectToken = 0; /* used for the prompt in main() */
static int quitStat = 0;
-static int axtoi(char *);
static int getChoice(char *, char *, char **, int);
static int getStringValue(char *header, char *footer, char *stringValue, int stringValueLength);
static int getNumberValue(char *header, char *footer, unsigned long *numberValue);
@@ -56,10 +55,8 @@
static void doPrintOwner(MSCUShort16);
void doPrintKeyFlags(MSCUShort16);
#endif
-static void _8ByteTo4Short(MSCUChar8 byteArray[8], MSCUShort16 shortArray[4]);
static MSCUShort16 getUShort16(MSCPUChar8 srcValue);
static MSCULong32 getULong32(MSCPUChar8 srcValue);
-static void setUShort16(MSCPUChar8 destValue, MSCUShort16 srcValue);
#define CHECK_ERR(cond, msg) { if (cond) { \
printf("ERR: %s (0x%lX %s)\n", msg, rv, msc_error(rv)); goto end; } }
@@ -68,6 +65,7 @@
printf("X\n"); } else { printf("\n"); } }
+#ifdef VERSION2
static void setUShort16(MSCPUChar8 destValue, MSCUShort16 srcValue) {
destValue[0] = (srcValue & 0xFF00) >> 8;
destValue[1] = (srcValue & 0x00FF);
@@ -80,6 +78,7 @@
shortArray[2] = getUShort16(byteArray+4);
shortArray[3] = getUShort16(byteArray+6);
}
+#endif
static MSCUShort16 getUShort16(MSCPUChar8 srcValue)
{
@@ -4171,45 +4170,3 @@
return;
}
-static int axtoi(char *hexStg) {
- int m = 0; // position to shift
- int intValue = 0; // integer value of hex string
- int len = 0;
- int i = 0;
- int sign = 1; // sign
- if (hexStg == NULL) {
- return 0;
- }
- len = strlen(hexStg);
- if (len > 0) {
- if (hexStg[0] == '-') {
- sign = -1;
- i++;
- }
- }
- else {
- return 0;
- }
- if (len-i > 1) {
- if (hexStg[i] == '0' && hexStg[i+1] == 'x') {
- i+=2;
- }
- }
- else {
- return 0;
- }
- m = len - 1;
- for (; i<len; i++, m--) {
- if (hexStg[i]=='\0')
- break;
- if (hexStg[i] > 0x29 && hexStg[i] < 0x40 ) //if 0 to 9
- intValue = intValue | (hexStg[i] & 0x0f) << (m << 2); //convert to int
- else if (hexStg[i] >='a' && hexStg[i] <= 'f') //if a to f
- intValue = intValue | ((hexStg[i] & 0x0f) + 9) << (m << 2); //convert to int
- else if (hexStg[i] >='A' && hexStg[i] <= 'F') //if A to F
- intValue = intValue | ((hexStg[i] & 0x0f) + 9) << (m << 2); //convert to int
- else break;
- }
- return (intValue * sign);
-}
-
More information about the Pcsclite-cvs-commit
mailing list