MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / SetCurrentPosPtr

Method SetCurrentPosPtr

UTCP/src/uh_ctrl.cpp:706–723  ·  view source on GitHub ↗

SetCurrentPosPtr Internal function Sets the current position within the history linked list Return 0 - (UH_SUCCESS) 1 - (UH_ERROR) ***********************************/

Source from the content-addressed store, hash-verified

704 1 - (UH_ERROR)
705***********************************/
706void CUH_Control::SetCurrentPosPtr(int pos){
707
708 if(m_HLCurrentPosPtr == NULL)
709 return;
710
711 while(m_HLCurrentPos <pos){
712 if(m_HLCurrentPosPtr->m_next == NULL)
713 break;
714 m_HLCurrentPosPtr = m_HLCurrentPosPtr->m_next;
715 m_HLCurrentPos++;
716 }
717 while(m_HLCurrentPos > pos){
718 if(m_HLCurrentPosPtr->m_prev == NULL)
719 break;
720 m_HLCurrentPosPtr = m_HLCurrentPosPtr->m_prev;
721 m_HLCurrentPos--;
722 }
723}
724
725/**********************************
726GetHistoryLength

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected