📄 prcountr.h
字号:
/* -----------------------------------------------------------------------** FUNCTION: PR_IncrementCounter() -- Add one to the referenced** counter.** ** DESCRIPTION: Add one to the referenced counter.** ** INPUTS:** handle: The PRCounterHandle of the counter to be incremented** ** OUTPUTS: The counter is incrementd.** ** RETURNS: void** ** RESTRICTIONS:** */#define PR_INCREMENT_COUNTER(handle) PR_IncrementCounter(handle)NSPR_API(void) PR_IncrementCounter( PRCounterHandle handle);/* -----------------------------------------------------------------------** FUNCTION: PR_DecrementCounter() -- Subtract one from the** referenced counter** ** DESCRIPTION: Subtract one from the referenced counter.** ** INPUTS: ** handle: The PRCounterHandle of the coutner to be** decremented.** ** OUTPUTS: the counter is decremented.** ** RETURNS: void** ** RESTRICTIONS:** */#define PR_DECREMENT_COUNTER(handle) PR_DecrementCounter(handle)NSPR_API(void) PR_DecrementCounter( PRCounterHandle handle);/* -----------------------------------------------------------------------** FUNCTION: PR_AddToCounter() -- Add a value to a counter.** ** DESCRIPTION: Add value to the counter referenced by handle.** ** INPUTS:** handle: the PRCounterHandle of the counter to be added to.** ** value: the value to be added to the counter.** ** OUTPUTS: new value for counter.** ** RETURNS: void** ** RESTRICTIONS:** */#define PR_ADD_TO_COUNTER(handle,value)\ PR_AddToCounter((handle),(value))NSPR_API(void) PR_AddToCounter( PRCounterHandle handle, PRUint32 value );/* -----------------------------------------------------------------------** FUNCTION: PR_SubtractFromCounter() -- A value is subtracted** from a counter.** ** DESCRIPTION:** Subtract a value from a counter.** ** INPUTS:** handle: the PRCounterHandle of the counter to be subtracted** from.** ** value: the value to be subtracted from the counter.** ** OUTPUTS: new value for counter** ** RETURNS: void** ** RESTRICTIONS:** */#define PR_SUBTRACT_FROM_COUNTER(handle,value)\ PR_SubtractFromCounter((handle),(value))NSPR_API(void) PR_SubtractFromCounter( PRCounterHandle handle, PRUint32 value );/* -----------------------------------------------------------------------** FUNCTION: PR_GetCounter() -- Retreive the value of a counter** ** DESCRIPTION:** Retreive the value of a counter.** ** INPUTS:** handle: the PR_CounterHandle of the counter to be retreived** ** OUTPUTS:** ** RETURNS: The value of the referenced counter** ** RESTRICTIONS:** */#define PR_GET_COUNTER(counter,handle)\ (counter) = PR_GetCounter((handle))NSPR_API(PRUint32) PR_GetCounter( PRCounterHandle handle );/* -----------------------------------------------------------------------** FUNCTION: PR_SetCounter() -- Replace the content of counter** with value.** ** DESCRIPTION: The contents of the referenced counter are** replaced by value.** ** INPUTS:** handle: the PRCounterHandle of the counter whose contents** are to be replaced.** ** value: the new value of the counter.** ** OUTPUTS:** ** RETURNS: void** ** RESTRICTIONS:** */#define PR_SET_COUNTER(handle,value) PR_SetCounter((handle),(value))NSPR_API(void) PR_SetCounter( PRCounterHandle handle, PRUint32 value );/* -----------------------------------------------------------------------** FUNCTION: PR_FindNextCounterQname() -- Retreive the next QName counter** handle iterator** ** DESCRIPTION:** PR_FindNextCounterQname() retreives the first or next Qname** the counter data base, depending on the value of handle. When** handle is NULL, the function attempts to retreive the first** QName handle in the database. When handle is a handle previosly** retreived QName handle, then the function attempts to retreive** the next QName handle.** ** INPUTS: ** handle: PRCounterHandle or NULL.** ** OUTPUTS: returned** ** RETURNS: PRCounterHandle or NULL when no more QName counter** handles are present.** ** RESTRICTIONS:** A concurrent PR_CreateCounter() or PR_DestroyCounter() may** cause unpredictable results.** ** A PRCounterHandle returned from this function may only be used** in another PR_FindNextCounterQname() function call; other** operations may cause unpredictable results.** */#define PR_FIND_NEXT_COUNTER_QNAME(next,handle)\ (next) = PR_FindNextCounterQname((handle))NSPR_API(PRCounterHandle) PR_FindNextCounterQname( PRCounterHandle handle);/* -----------------------------------------------------------------------** FUNCTION: PR_FindNextCounterRname() -- Retreive the next RName counter** handle iterator** ** DESCRIPTION:** PR_FindNextCounterRname() retreives the first or next RNname** handle from the counter data base, depending on the** value of handle. When handle is NULL, the function attempts to** retreive the first RName handle in the database. When handle is** a handle previosly retreived RName handle, then the function** attempts to retreive the next RName handle.** ** INPUTS:** handle: PRCounterHandle or NULL.** qhandle: PRCounterHandle of a previously aquired via** PR_FIND_NEXT_QNAME_HANDLE()** ** OUTPUTS: returned** ** RETURNS: PRCounterHandle or NULL when no more RName counter** handles are present.** ** RESTRICTIONS:** A concurrent PR_CreateCounter() or PR_DestroyCounter() may** cause unpredictable results.** ** A PRCounterHandle returned from this function may only be used** in another PR_FindNextCounterRname() function call; other** operations may cause unpredictable results.** */#define PR_FIND_NEXT_COUNTER_RNAME(next,rhandle,qhandle)\ (next) = PR_FindNextCounterRname((rhandle),(qhandle))NSPR_API(PRCounterHandle) PR_FindNextCounterRname( PRCounterHandle rhandle, PRCounterHandle qhandle);#else /* ( !(defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)) *//*** When counters are not compiled in, provide macros that ** evaluate to No-Ops.***/#define PR_DEFINE_COUNTER(name) PRCounterHandle name#define PR_INIT_COUNTER_HANDLE(handle,value)#define PR_CREATE_COUNTER(handle,qName,rName,description)#define PR_DESTROY_COUNTER(handle)#define PR_GET_COUNTER_HANDLE_FROM_NAME(handle,qName,rName)#define PR_GET_COUNTER_NAME_FROM_HANDLE(handle,qName,rName,description )#define PR_INCREMENT_COUNTER(handle)#define PR_DECREMENT_COUNTER(handle)#define PR_ADD_TO_COUNTER(handle,value)#define PR_SUBTRACT_FROM_COUNTER(handle,value)#define PR_GET_COUNTER(counter,handle) 0#define PR_SET_COUNTER(handle,value)#define PR_FIND_NEXT_COUNTER_QNAME(next,handle) NULL#define PR_FIND_NEXT_COUNTER_RNAME(next,rhandle,qhandle)#endif /* ( !(defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)) */PR_END_EXTERN_C#endif /* prcountr_h___ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -