add compiler conditions to ignore scanner lib stuff

This commit is contained in:
Lance Edgar 2012-12-04 11:55:58 -08:00
parent 9ba22bc0dd
commit 89ed050d23
2 changed files with 43 additions and 7 deletions

View file

@ -8,12 +8,18 @@
#include <PalmOS.h> #include <PalmOS.h>
// BCS2 Scanner #ifdef SCANLIB_BCS2
#include "BCS2ScannerLib.h" #include "BCS2ScannerLib.h"
#endif
// Janam Scanner #ifdef SCANLIB_JANAM
#include "JanamScnCompatible.h" #include "JanamScnCompatible.h"
#include "ScanMgr.h" #include "ScanMgr.h"
#endif
#ifdef SCANLIB_SYMBOL
#include "Symbol/ScanMgrDef.h"
#endif
// Rattail App // Rattail App
#include "AppResources.h" #include "AppResources.h"
@ -50,13 +56,19 @@
* *
***********************************************************************/ ***********************************************************************/
UInt16 cardNo = 0; UInt16 cardNo = 0;
UInt16 gBcs2RefNum = 0;
Boolean gBabbo = false;
//UInt16 gNumCols = 3; //UInt16 gNumCols = 3;
//UInt16 gNumRows = 11; //UInt16 gNumRows = 11;
//MemHandle gHandles[11][3]; //MemHandle gHandles[11][3];
Int16 gTopVisibleRecord = -1; Int16 gTopVisibleRecord = -1;
#ifdef SCANLIB_BCS2
UInt16 gBcs2RefNum = 0;
#endif
#ifdef SCANLIB_JANAM
Boolean gBabbo = false;
#endif
// This stores the resource ID of the selector trigger associated with the // This stores the resource ID of the selector trigger associated with the
// quantity currently being edited with the Quantity Form. Its value will be // quantity currently being edited with the Quantity Form. Its value will be
// either MainFormCases or MainFormUnits. // either MainFormCases or MainFormUnits.
@ -126,8 +138,13 @@ static Boolean AppHandleEvent(EventPtr event)
static Err AppStart(void) static Err AppStart(void)
{ {
#ifdef SCANLIB_BCS2
OpenBCS2Scanner(); OpenBCS2Scanner();
#endif
#ifdef SCANLIB_JANAM
//OpenBabboScanner(); //OpenBabboScanner();
#endif
FrmGotoForm(MainForm); FrmGotoForm(MainForm);
return errNone; return errNone;
@ -142,8 +159,13 @@ static Err AppStart(void)
static void AppStop(void) static void AppStop(void)
{ {
#ifdef SCANLIB_BCS2
CloseBCS2Scanner(); CloseBCS2Scanner();
#endif
#ifdef SCANLIB_JANAM
//CloseBabboScanner(); //CloseBabboScanner();
#endif
FrmCloseAllForms(); FrmCloseAllForms();
} }
@ -178,6 +200,7 @@ static void AppEventLoop(void)
} }
#ifdef SCANLIB_JANAM
/************************************************************ /************************************************************
* *
* FUNCTION: CloseBabboScanner * FUNCTION: CloseBabboScanner
@ -195,8 +218,10 @@ static void CloseBabboScanner()
gBabbo = false; gBabbo = false;
} }
*/ */
#endif
#ifdef SCANLIB_BCS2
/************************************************************ /************************************************************
* *
* FUNCTION: CloseBCS2Scanner * FUNCTION: CloseBCS2Scanner
@ -218,6 +243,7 @@ static void CloseBCS2Scanner()
SysLibRemove(gBcs2RefNum); SysLibRemove(gBcs2RefNum);
gBcs2RefNum = 0; gBcs2RefNum = 0;
} }
#endif
/************************************************************ /************************************************************
@ -577,6 +603,7 @@ static void MainFormLoadTable(TablePtr table, Boolean updateScroll)
} }
#ifdef SCANLIB_JANAM
/************************************************************ /************************************************************
* *
* FUNCTION: OpenBabboScanner * FUNCTION: OpenBabboScanner
@ -609,8 +636,10 @@ static Boolean OpenBabboScanner()
return true; return true;
} }
*/ */
#endif
#ifdef SCANLIB_BCS2
/************************************************************ /************************************************************
* *
* FUNCTION: OpenBCS2Scanner * FUNCTION: OpenBCS2Scanner
@ -685,6 +714,7 @@ static Boolean OpenBCS2Scanner()
return true; return true;
} }
#endif
/************************************************************ /************************************************************

View file

@ -7,8 +7,16 @@ typedef struct {
} RatScanDbRecord; } RatScanDbRecord;
//static void CloseBabboScanner(); #ifdef SCANLIB_BCS2
static Boolean OpenBCS2Scanner();
static void CloseBCS2Scanner(); static void CloseBCS2Scanner();
#endif
#ifdef SCANLIB_JANAM
//static Boolean OpenBabboScanner();
//static void CloseBabboScanner();
#endif
static DmOpenRef CreateScanDatabase(); static DmOpenRef CreateScanDatabase();
static void DrawCustomTableItem(void* table, Int16 row, Int16 col, RectangleType* bounds); static void DrawCustomTableItem(void* table, Int16 row, Int16 col, RectangleType* bounds);
/* static Int16 GetCheckedValue(UInt16 objId); */ /* static Int16 GetCheckedValue(UInt16 objId); */
@ -17,8 +25,6 @@ static void *GetObjectPtr(UInt16 objId);
static Boolean MainFormHandleEvent(EventPtr event); static Boolean MainFormHandleEvent(EventPtr event);
static void MainFormInit(FormPtr form); static void MainFormInit(FormPtr form);
static void MainFormLoadTable(TablePtr table, Boolean updateScroll); static void MainFormLoadTable(TablePtr table, Boolean updateScroll);
//static Boolean OpenBabboScanner();
static Boolean OpenBCS2Scanner();
static DmOpenRef OpenScanDatabase(); static DmOpenRef OpenScanDatabase();
static void SetFieldFocus(UInt16 objId); static void SetFieldFocus(UInt16 objId);
static void ShowQuantityForm(UInt16 triggerID, Boolean manual); static void ShowQuantityForm(UInt16 triggerID, Boolean manual);