char *LogoManager_ChannelNameToLogoName(char *ChannelName, char *LogoName, int LogoNameSize)
{
  TRACEENTER();

  char                 *pLogoName;
  char                  AllowedChars[] = "abcdefghijklmnoprqstuvwxyz0123456789הצ�+";

  if(LogoName && LogoNameSize)
  {
    memset(LogoName, 0, LogoNameSize);
    strncpy(LogoName, SkipCharTableBytes(ChannelName), LogoNameSize - 1);
    StrMkISO(LogoName);
    MakeValidFileName(LogoName, ControlChars | LFChars);
    LowerCase(LogoName);

    pLogoName = LogoName;
    while(*pLogoName)
    {
      if(index(AllowedChars, *pLogoName) == NULL)
        DeleteAt(pLogoName, 0, 1);
      else
        pLogoName++;
    }
    StrReplace(LogoName, "ה", "ae");
    StrReplace(LogoName, "צ", "oe");
    StrReplace(LogoName, "�", "ue");
  }

  TRACEEXIT();
  return LogoName;
}
예제 #2
0
void DeleteAll(BAN ban[], int *iIndex)
{
        for (int i = 0; i < *iIndex; i++)
        {
                DeleteAt(ban, iIndex, i);
        }
        *iIndex = 0;
}
예제 #3
0
AUI_ERRCODE aui_DirtyList::SubtractRect( RECT *sub )
{
	AUI_ERRCODE alteredList = AUI_ERRCODE_UNHANDLED;

	Assert( sub != NULL );
	if ( !sub ) return alteredList;

	if ( sub->left < sub->right && sub->top < sub->bottom )
	{

		ListPos position = GetHeadPosition();
		for ( sint32 i = L(); i; i-- )
		{
			ListPos prevPosition = position;
			RECT *rect = GetNext( position );

			static RECT moreRects[4];
			static sint32 num;
			if ( (num = Rectangle_Subtract( rect, sub, moreRects )) > 0 )
			{

				if ( memcmp( rect, moreRects, sizeof( RECT ) ) )
				{
					alteredList = AUI_ERRCODE_HANDLED;

					CopyRect( rect, moreRects );

					ListPos insertPosition = prevPosition;
					for ( sint32 j = 1; j < num; j++ )
					{
						RECT *r = m_rectMemory->New();
						Assert( r != NULL );
						if ( !r ) return alteredList;

						CopyRect( r, moreRects + j );

						InsertAfter( insertPosition, r );
						GetNext( insertPosition );
					}
				}
			}
			else if ( !num )
			{
				m_rectMemory->Delete( rect );
				DeleteAt( prevPosition );
			}
			else
			{

			}
		}
	}

	return alteredList;
}
예제 #4
0
파일: csstring.cpp 프로젝트: garinh/cs
// Note: isalpha(int c),  toupper(int c), tolower(int c), isspace(int c)
// If c is not an unsigned char value, or EOF, the behaviour of these functions
// is undefined.
csStringBase &csStringBase::LTrim()
{
  size_t i;
  char const* const p = GetData();
  for (i = 0; i < Size; i++)
    if (!isspace ((unsigned char)p[i]))
      break;
  if (i > 0)
    DeleteAt (0, i);
  return *this;
}
예제 #5
0
/**--------------------------------------------------------------------------<BR>
C2DLineBaseSet::Remove0Lines
\brief Removes lines smaller than the tolerance.
<P>---------------------------------------------------------------------------*/
void C2DLineBaseSet::Remove0Lines(double dTolerance)
{
	for (unsigned int i = 0 ; i < size(); i++)
	{
		double dLength = GetAt(i)->GetLength();

		if (dLength < dTolerance)
		{
			DeleteAt(i);
		}
	}
}
예제 #6
0
void MemoryBuffer::Clear(int clean_buf) 
// Clear the buffer. If the "clean_buf" variable is
// true the contents of the buffer will be cleared,
// otherwise the logical length will be set to 
// zero and the contents of the buffer will not
// cleared.
{ 
  if(l_length > 0) {
    if(clean_buf) DeleteAt(0, l_length); 
  }
  l_length = 0;
} 
void ReturnVideo(LINKEDLIST* Rentallist){
	int temp = 0;
	printf("찾을 값 : ");
	scanf_s("%d", &temp);
	fflush(stdin);
	NODE * pFindFlag = SSearchNumber(Rentallist, temp);
	if (pFindFlag == NULL){
		printf("그런거 없다.");
		return;
	}
	((VIDEO *)pFindFlag->pData)->bRent = true;
	DeleteAt(Rentallist,pFindFlag);
}
예제 #8
0
//void MoveMemberData();
//Delete Index change need to use address &iIndex
void Delete_me(BAN MemberArray[],int * piIndex)//Delete func to delete member
{
	for(int i=0;i<*piIndex;i++){
		int iSearch = Search_name(MemberArray,piIndex);
		if(iSearch != -1){
			//PrintMemberData(&MemberArray[i]);
			DeleteAt(MemberArray,piIndex,iSearch);
		}else
		{
			printf("NOT FOUND!!!");
		}
	}
	PrintAll(MemberArray,*piIndex);
}
int ReturnVideo_Client(LINKEDLIST* Rentallist, LINKEDLIST* Videolist, int VideoNum)
{
	NODE * pFindFlag = SSearchRentalNumber(Rentallist, VideoNum);
	NODE * pFindVideo = SSearchNumber(Videolist, VideoNum);
	if (pFindFlag == NULL){
		printf("ÀÏÄ¡ÇÏ´Â ºñµð¿À ¹øÈ£°¡ ¾ø½À´Ï´Ù.\n");
		return 1;
	}
	((VIDEO *)pFindFlag->pData)->bRent = true;
	((VIDEO *)pFindVideo->pData)->bRent = true;
	DeleteAt(Rentallist, pFindFlag);
	printf(" ¹ø ºñµð¿À°¡ ¹Ý³³‰ç½À´Ï´Ù.\n");
	return 0;
}
bool DeleteClient(LINKEDLIST * pList, SOCKET DeleteSocket)
{
	if (pList->iCount)
	{
		return false;
	}
	NODE*pSearch = Search(pList, EqualFunc, (void*)DeleteSocket);
	if (pSearch)
	{
		SOCKET ClientSocket = (SOCKET)pSearch->pData;
		DeleteAt(pList, pSearch);
		SendPacket(ClientSocket, PG_FAIL,"로그아웃\n", 128);
		return true;
	}
	return false;
}
void ReturnVideo(LINKEDLIST* Rentallist, LINKEDLIST* Videolist){
	int temp = 0;
	printf("¹Ý³³ÇÒ ºñµð¿À ¹øÈ£ : ");
	scanf_s("%d", &temp);
	fflush(stdin);
	NODE * pFindFlag = SSearchRentalNumber(Rentallist, temp);
	NODE * pFindVideo = SSearchNumber(Videolist, temp);
	if (pFindFlag == NULL){
		printf("ÀÏÄ¡ÇÏ´Â ºñµð¿À ¹øÈ£°¡ ¾ø½À´Ï´Ù.\n");
		return ;
	}
	((VIDEO *)pFindFlag->pData)->bRent = true;
	((VIDEO *)pFindVideo->pData)->bRent = true;
	DeleteAt(Rentallist,pFindFlag);
	printf("ºñµð¿À¸¦ ¹Ý³³Çß½À´Ï´Ù.\n");

}
예제 #12
0
AUI_ERRCODE aui_DirtyList::Minimize( void )
{

	BOOL shouldContinue = L() > 1;

	while ( shouldContinue )
	{

		shouldContinue = FALSE;

		ListPos curPos = GetHeadPosition();

		for ( sint32 i = L() - 1; i; i-- )
		{

			RECT *curRect = GetNext( curPos );

			ListPos nextPos = curPos;

			for ( sint32 j = i; j; j-- )
			{

				ListPos prevPos = nextPos;
				RECT *nextRect = GetNext( nextPos );

				RECT conRect;
				if ( Rectangle_SmartConsolidate( &conRect, curRect, nextRect ) )
				{

					m_rectMemory->Delete( nextRect );
					DeleteAt( prevPos );

					CopyRect( curRect, &conRect );

					shouldContinue = L() > 1;
					break;
				}
			}

			if ( shouldContinue ) break;
		}
	}

	return AUI_ERRCODE_OK;
}
예제 #13
0
	void Remove(T item)
	{
		uword indx = IndexOf(item);
		if(indx != (uword) -1) DeleteAt(indx);
	}
bool DeleteBottom(LINKEDLIST * pLinkedList)
{
	return DeleteAt(pLinkedList, pLinkedList->pBottom);
}
bool DeleteTop(LINKEDLIST * pLinkedList)
{
	return DeleteAt(pLinkedList, pLinkedList->pTop);
}