´ÙÀ̳ª¹Í Æ˾÷ ¸®½ºÆ®

/* ¸®½ºÆ® ¾ÆÀÌÅÛ À̸§ */
P_U8 listitemname[ i ];

/* Æ˾÷¿¡ Æ÷Ç﵃ ¾ÆÀÌÅÛÀÇ ½ºÆ®¸µ ¸®½ºÆ® */
P_U8 *gItemList;

/* nlistitem ¼ýÀÚ ¸¸Å­ ¸Þ¸ð¸®¸¦ ÇÒ´çÇÏ°í À̸§À» ¼³Á¤ÇÑ´Ù. */
void CreatePopupList( U8 nlistitem )
{
   int i;

   gItemList = Lmalloc( sizeof(P_U8) * nlistitem );
   for( i=0 ; i<nlistitem ; i++ )
   {
     gItemList[i] = Lmalloc( strlen( listitemname[ i ] ) + 1 );
     strcpy( gItemList[i], listitemname[ i ] );
   }
}

/* ÇÒ´çµÈ ¸Þ¸ð¸®¸¦ ÇØÁ¦ ÇÑ´Ù. */
void DestroyPopupList( U8 nlistitem )
{
   int i;

   for( i=0 ; i<nlistitem ; i++ )
   {
     Lfree( gItemList[i] );
   }
   Lfree( gItemList );
}


Copyright © 1998-2006 PDAProgramming.com All rights reserved.