STOQ.cpp
/*--- function GetHead -----------------------------------
 *
 *  Exit:   Returns TRUE if we were able to get and remove a list member,
 *          in which case
 *          strBuf   is the contents of the STOQ entry.
 */
function GetHead
Exit:   Returns TRUE if we were able to get and remove a list member,
in which case
strBuf   is the contents of the STOQ entry.
function GetHead Exit : Returns TRUE if we were able to get and remove a list member in which case strBuf is the contents of the STOQ entry .
BOOL CSTOQ::GetHead(CString &strBuf, int &nRemaining)
{
   BOOL bGot=TRUE;
   EnterCriticalSection(&m_critSTOQ);
   if(!m_pSTOQList->IsEmpty()) {
      strBuf = m_pSTOQList->RemoveHead();
      nRemaining = m_pSTOQList->GetCount();
   } else {
      bGot = FALSE;
      nRemaining = 0;
   }
   LeaveCriticalSection(&m_critSTOQ);
   return bGot;
}
BOOL CSTOQ :: GetHead ( CString & strBuf , int & nRemaining ) { BOOL bGot = TRUE ; EnterCriticalSection ( & m_critSTOQ ) ; if ( ! m_pSTOQList -> IsEmpty ( ) ) { strBuf = m_pSTOQList -> RemoveHead ( ) ; nRemaining = m_pSTOQList -> GetCount ( ) ; } else { bGot = FALSE ; nRemaining = 0 ; } LeaveCriticalSection ( & m_critSTOQ ) ; return bGot ; }
function GetHead
  Exit:   Returns TRUE if we were able to get and remove a list member,
          in which case
          strBuf   is the contents of the STOQ entry.
function GetHead Exit : Returns TRUE if we were able to get and remove a list member in which case strBuf is the contents of the STOQ entry .