• Home
  • Raw
  • Download

Lines Matching refs:cpA

41 void bbs_Context_init( struct bbs_Context* cpA )  in bbs_Context_init()  argument
46 cpA->errStackE[ iL ].errorE = bbs_ERR_OK; in bbs_Context_init()
47 cpA->errStackE[ iL ].fileE[ 0 ] = 0; in bbs_Context_init()
48 cpA->errStackE[ iL ].lineE = 0; in bbs_Context_init()
49 cpA->errStackE[ iL ].textE[ 0 ] = 0; in bbs_Context_init()
52 cpA->errIndexE = 0; in bbs_Context_init()
54 bbs_MemTbl_init( cpA, &cpA->memTblE ); in bbs_Context_init()
58 bbs_DynMemManager_init( cpA, &cpA->dynMemManagerArrE[ iL ] ); in bbs_Context_init()
61 cpA->dynMemManagerArrSizeE = 0; in bbs_Context_init()
62 cpA->errorHandlerE = NULL; in bbs_Context_init()
63 cpA->callbackHandlerE = NULL; in bbs_Context_init()
64 cpA->userPtrE = NULL; in bbs_Context_init()
69 void bbs_Context_exit( struct bbs_Context* cpA ) in bbs_Context_exit() argument
74 cpA->errStackE[ iL ].errorE = bbs_ERR_OK; in bbs_Context_exit()
75 cpA->errStackE[ iL ].fileE[ 0 ] = 0; in bbs_Context_exit()
76 cpA->errStackE[ iL ].lineE = 0; in bbs_Context_exit()
77 cpA->errStackE[ iL ].textE[ 0 ] = 0; in bbs_Context_exit()
80 cpA->errIndexE = 0; in bbs_Context_exit()
82 bbs_MemTbl_exit( cpA, &cpA->memTblE ); in bbs_Context_exit()
84 for( iL = 0; iL < cpA->dynMemManagerArrSizeE; iL++ ) in bbs_Context_exit()
86 bbs_DynMemManager_freeAll( cpA, &cpA->dynMemManagerArrE[ iL ] ); in bbs_Context_exit()
91 bbs_DynMemManager_exit( cpA, &cpA->dynMemManagerArrE[ iL ] ); in bbs_Context_exit()
94 cpA->dynMemManagerArrSizeE = 0; in bbs_Context_exit()
95 cpA->errorHandlerE = NULL; in bbs_Context_exit()
96 cpA->callbackHandlerE = NULL; in bbs_Context_exit()
97 cpA->userPtrE = NULL; in bbs_Context_exit()
110 void bbs_Context_copy( struct bbs_Context* cpA, const struct bbs_Context* srcPtrA ) in bbs_Context_copy() argument
188 flag bbs_Context_pushError( struct bbs_Context* cpA, struct bbs_Error errorA ) in bbs_Context_pushError() argument
191 if( cpA->errIndexE < bbs_CONTEXT_MAX_ERRORS ) in bbs_Context_pushError()
193 cpA->errStackE[ cpA->errIndexE++ ] = errorA; in bbs_Context_pushError()
197 if( cpA->errorHandlerE != NULL ) in bbs_Context_pushError()
199 cpA->errorHandlerE( cpA ); in bbs_Context_pushError()
207 struct bbs_Error bbs_Context_popError( struct bbs_Context* cpA ) in bbs_Context_popError() argument
209 if( cpA->errIndexE > 0 ) in bbs_Context_popError()
211 return cpA->errStackE[ --( cpA->errIndexE ) ]; in bbs_Context_popError()
215 return cpA->errStackE[ 0 ]; in bbs_Context_popError()
221 struct bbs_Error bbs_Context_peekError( struct bbs_Context* cpA ) in bbs_Context_peekError() argument
223 if( cpA->errIndexE > 0 ) in bbs_Context_peekError()
225 return cpA->errStackE[ cpA->errIndexE - 1 ]; in bbs_Context_peekError()
229 return cpA->errStackE[ 0 ]; in bbs_Context_peekError()
235 flag bbs_Context_error( struct bbs_Context* cpA ) in bbs_Context_error() argument
237 return cpA->errIndexE > 0; in bbs_Context_error()
242 bbs_errorFPtr bbs_Context_setErrorHandler( struct bbs_Context* cpA, in bbs_Context_setErrorHandler() argument
245 bbs_errorFPtr oldErrorHandlerL = cpA->errorHandlerE; in bbs_Context_setErrorHandler()
246 cpA->errorHandlerE = errorHandlerA; in bbs_Context_setErrorHandler()
252 void bbs_Context_doCallback( struct bbs_Context* cpA ) in bbs_Context_doCallback() argument
254 if( cpA->callbackHandlerE != NULL ) in bbs_Context_doCallback()
256 uint32 errorL = ( *cpA->callbackHandlerE )( cpA ); in bbs_Context_doCallback()
259 bbs_Context_pushError( cpA, bbs_Error_create( errorL, 0, NULL, NULL ) ); in bbs_Context_doCallback()
266 bbs_callbackFPtr bbs_Context_setCallbackHandler( struct bbs_Context* cpA, in bbs_Context_setCallbackHandler() argument
269 bbs_callbackFPtr oldCallbackHandlerL = cpA->callbackHandlerE; in bbs_Context_setCallbackHandler()
270 cpA->callbackHandlerE = callbackHandlerA; in bbs_Context_setCallbackHandler()
277 void bbs_Context_addStaticSeg( struct bbs_Context* cpA, in bbs_Context_addStaticSeg() argument
288 if( sharedA && cpA->memTblE.ssSizeE == bbs_MAX_MEM_SEGS ) in bbs_Context_addStaticSeg()
293 if( sharedA && cpA->memTblE.esSizeE == bbs_MAX_MEM_SEGS ) in bbs_Context_addStaticSeg()
300 bbs_MemSeg_init( cpA, &memSegL ); in bbs_Context_addStaticSeg()
310 cpA->memTblE.ssArrE[ cpA->memTblE.ssSizeE++ ] = memSegL; in bbs_Context_addStaticSeg()
314 cpA->memTblE.esArrE[ cpA->memTblE.esSizeE ] = memSegL; in bbs_Context_addStaticSeg()
315 cpA->memTblE.espArrE[ cpA->memTblE.esSizeE ] = &cpA->memTblE.esArrE[ cpA->memTblE.esSizeE ]; in bbs_Context_addStaticSeg()
316 cpA->memTblE.esSizeE++; in bbs_Context_addStaticSeg()
325 void bbs_Context_addDynamicSeg( struct bbs_Context* cpA, in bbs_Context_addDynamicSeg() argument
337 if( cpA->dynMemManagerArrSizeE == bbs_CONTEXT_MAX_MEM_MANAGERS ) in bbs_Context_addDynamicSeg()
342 if( sharedA && cpA->memTblE.ssSizeE == bbs_MAX_MEM_SEGS ) in bbs_Context_addDynamicSeg()
347 if( sharedA && cpA->memTblE.esSizeE == bbs_MAX_MEM_SEGS ) in bbs_Context_addDynamicSeg()
353 bbs_DynMemManager_init( cpA, &memManagerL ); in bbs_Context_addDynamicSeg()
357 cpA->dynMemManagerArrE[ cpA->dynMemManagerArrSizeE++ ] = memManagerL; in bbs_Context_addDynamicSeg()
359 bbs_MemSeg_init( cpA, &memSegL ); in bbs_Context_addDynamicSeg()
365 memSegL.dynMemManagerPtrE = &cpA->dynMemManagerArrE[ cpA->dynMemManagerArrSizeE - 1 ]; in bbs_Context_addDynamicSeg()
369 cpA->memTblE.ssArrE[ cpA->memTblE.ssSizeE++ ] = memSegL; in bbs_Context_addDynamicSeg()
373 cpA->memTblE.esArrE[ cpA->memTblE.esSizeE ] = memSegL; in bbs_Context_addDynamicSeg()
374 cpA->memTblE.espArrE[ cpA->memTblE.esSizeE ] = &cpA->memTblE.esArrE[ cpA->memTblE.esSizeE ]; in bbs_Context_addDynamicSeg()
375 cpA->memTblE.esSizeE++; in bbs_Context_addDynamicSeg()
381 uint32 bbs_Context_exclAllocSize( struct bbs_Context* cpA, uint32 segIndexA ) in bbs_Context_exclAllocSize() argument
383 return bbs_MemSeg_allocatedSize( cpA, &cpA->memTblE.esArrE[ segIndexA ] ); in bbs_Context_exclAllocSize()
388 uint32 bbs_Context_shrdAllocSize( struct bbs_Context* cpA, uint32 segIndexA ) in bbs_Context_shrdAllocSize() argument
390 return bbs_MemSeg_allocatedSize( cpA, &cpA->memTblE.ssArrE[ segIndexA ] ); in bbs_Context_shrdAllocSize()
395 void bbs_Context_quickInit( struct bbs_Context* cpA, in bbs_Context_quickInit() argument
400 bbs_Context_init( cpA ); in bbs_Context_quickInit()
401 bbs_Context_addDynamicSeg( cpA, mallocFPtrA, freeFPtrA, FALSE, 0 ); in bbs_Context_quickInit()
402 bbs_Context_addDynamicSeg( cpA, mallocFPtrA, freeFPtrA, TRUE, 0 ); in bbs_Context_quickInit()
403 bbs_Context_setErrorHandler( cpA, errorHandlerA ); in bbs_Context_quickInit()