diff options
Diffstat (limited to 'clientfiles/very-important-source-code/npclient.c')
-rw-r--r-- | clientfiles/very-important-source-code/npclient.c | 51 |
1 files changed, 26 insertions, 25 deletions
diff --git a/clientfiles/very-important-source-code/npclient.c b/clientfiles/very-important-source-code/npclient.c index d5b78aff..b8ec65ff 100644 --- a/clientfiles/very-important-source-code/npclient.c +++ b/clientfiles/very-important-source-code/npclient.c @@ -46,7 +46,7 @@ static double r = 0, p = 0, y = 0, tx = 0, ty = 0, tz = 0; #define NP_DECLSPEC __declspec(dllexport) #define NP_EXPORT(t) t NP_DECLSPEC __stdcall -#define NP_AXIS_MAX 16383 +#define NP_AXIS_MAX 16383 static BOOL FTCreateMapping(void); static void FTDestroyMapping(void); @@ -109,7 +109,7 @@ BOOL DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE; } /****************************************************************** - * NPPriv_ClientNotify (NPCLIENT.1) + * NPPriv_ClientNotify (NPCLIENT.1) */ NP_EXPORT(int) NPPriv_ClientNotify(void) @@ -119,7 +119,7 @@ NP_EXPORT(int) NPPriv_ClientNotify(void) return 0; } /****************************************************************** - * NPPriv_GetLastError (NPCLIENT.2) + * NPPriv_GetLastError (NPCLIENT.2) */ NP_EXPORT(int) NPPriv_GetLastError(void) @@ -129,7 +129,7 @@ NP_EXPORT(int) NPPriv_GetLastError(void) return 0; } /****************************************************************** - * NPPriv_SetData (NPCLIENT.3) + * NPPriv_SetData (NPCLIENT.3) */ NP_EXPORT(int) NPPriv_SetData(void) @@ -139,7 +139,7 @@ NP_EXPORT(int) NPPriv_SetData(void) return 0; } /****************************************************************** - * NPPriv_SetLastError (NPCLIENT.4) + * NPPriv_SetLastError (NPCLIENT.4) */ NP_EXPORT(int) NPPriv_SetLastError(void) @@ -149,7 +149,7 @@ NP_EXPORT(int) NPPriv_SetLastError(void) return 0; } /****************************************************************** - * NPPriv_SetParameter (NPCLIENT.5) + * NPPriv_SetParameter (NPCLIENT.5) */ NP_EXPORT(int) NPPriv_SetParameter(void) @@ -159,7 +159,7 @@ NP_EXPORT(int) NPPriv_SetParameter(void) return 0; } /****************************************************************** - * NPPriv_SetSignature (NPCLIENT.6) + * NPPriv_SetSignature (NPCLIENT.6) */ NP_EXPORT(int) NPPriv_SetSignature(void) @@ -169,7 +169,7 @@ NP_EXPORT(int) NPPriv_SetSignature(void) return 0; } /****************************************************************** - * NPPriv_SetVersion (NPCLIENT.7) + * NPPriv_SetVersion (NPCLIENT.7) */ NP_EXPORT(int) NPPriv_SetVersion(void) @@ -263,7 +263,7 @@ static __inline void enhance(unsigned char buf[], unsigned int size, } /****************************************************************** - * NP_GetData (NPCLIENT.8) + * NP_GetData (NPCLIENT.8) */ NP_EXPORT(int) NP_GetData(tir_data_t * data) @@ -316,7 +316,7 @@ NP_EXPORT(int) NP_GetData(tir_data_t * data) data->ty = scale2AnalogLimits (ty, -500.0, 500.0); data->tz = scale2AnalogLimits (tz, -500.0, 500.0); - for(i = 0; i < 9; ++i){ + for(i = 0; i < 9; ++i) { data->padding[i] = 0.0; } @@ -325,13 +325,14 @@ NP_EXPORT(int) NP_GetData(tir_data_t * data) #endif data->cksum = cksum((unsigned char*)data, sizeof(tir_data_t)); - if(bEncryption){ + + if(bEncryption) { enhance((unsigned char*)data, sizeof(tir_data_t), table, sizeof(table)); } return 0; } /****************************************************************** - * NP_GetParameter (NPCLIENT.9) + * NP_GetParameter (NPCLIENT.9) */ NP_EXPORT(int) NP_GetParameter(int arg0, int arg1) @@ -341,7 +342,7 @@ NP_EXPORT(int) NP_GetParameter(int arg0, int arg1) } /****************************************************************** - * NP_GetSignature (NPCLIENT.10) + * NP_GetSignature (NPCLIENT.10) * * */ @@ -442,7 +443,7 @@ NP_EXPORT(int) NP_QueryVersion(unsigned short * version) return 0; } /****************************************************************** - * NP_ReCenter (NPCLIENT.12) + * NP_ReCenter (NPCLIENT.12) */ NP_EXPORT(int) NP_ReCenter(void) @@ -452,7 +453,7 @@ NP_EXPORT(int) NP_ReCenter(void) } /****************************************************************** - * NP_RegisterProgramProfileID (NPCLIENT.13) + * NP_RegisterProgramProfileID (NPCLIENT.13) */ NP_EXPORT(int) NP_RegisterProgramProfileID(unsigned short id) @@ -463,7 +464,7 @@ NP_EXPORT(int) NP_RegisterProgramProfileID(unsigned short id) return 0; } /****************************************************************** - * NP_RegisterWindowHandle (NPCLIENT.14) + * NP_RegisterWindowHandle (NPCLIENT.14) */ NP_EXPORT(int) NP_RegisterWindowHandle(HWND hwnd) @@ -472,7 +473,7 @@ NP_EXPORT(int) NP_RegisterWindowHandle(HWND hwnd) return (int) 0; } /****************************************************************** - * NP_RequestData (NPCLIENT.15) + * NP_RequestData (NPCLIENT.15) */ NP_EXPORT(int) NP_RequestData(unsigned short req) @@ -481,7 +482,7 @@ NP_EXPORT(int) NP_RequestData(unsigned short req) return (int) 0; } /****************************************************************** - * NP_SetParameter (NPCLIENT.16) + * NP_SetParameter (NPCLIENT.16) */ NP_EXPORT(int) NP_SetParameter(int arg0, int arg1) @@ -490,7 +491,7 @@ NP_EXPORT(int) NP_SetParameter(int arg0, int arg1) return (int) 0; } /****************************************************************** - * NP_StartCursor (NPCLIENT.17) + * NP_StartCursor (NPCLIENT.17) */ NP_EXPORT(int) NP_StartCursor(void) @@ -499,7 +500,7 @@ NP_EXPORT(int) NP_StartCursor(void) return (int) 0; } /****************************************************************** - * NP_StartDataTransmission (NPCLIENT.18) + * NP_StartDataTransmission (NPCLIENT.18) */ NP_EXPORT(int) NP_StartDataTransmission(void) @@ -509,7 +510,7 @@ NP_EXPORT(int) NP_StartDataTransmission(void) return (int) 0; } /****************************************************************** - * NP_StopCursor (NPCLIENT.19) + * NP_StopCursor (NPCLIENT.19) */ NP_EXPORT(int) NP_StopCursor(void) @@ -518,7 +519,7 @@ NP_EXPORT(int) NP_StopCursor(void) return (int) 0; } /****************************************************************** - * NP_StopDataTransmission (NPCLIENT.20) + * NP_StopDataTransmission (NPCLIENT.20) */ NP_EXPORT(int) NP_StopDataTransmission(void) @@ -526,7 +527,7 @@ NP_EXPORT(int) NP_StopDataTransmission(void) return (int) 0; } /****************************************************************** - * NP_UnregisterWindowHandle (NPCLIENT.21) + * NP_UnregisterWindowHandle (NPCLIENT.21) */ NP_EXPORT(int) NP_UnregisterWindowHandle(void) @@ -538,9 +539,9 @@ NP_EXPORT(int) NP_UnregisterWindowHandle(void) static BOOL FTCreateMapping(void) { BOOL bMappingExists = FALSE; - if ( pMemData != NULL ) { + + if (pMemData) return TRUE; - } dbg_report("FTCreateMapping request (pMemData == NULL).\n"); |