/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+DWord
+ DrCC_EditText_GetMaxNum_TextInfo(
+ void )
+{
+ return gdw_max_textinfo;
+}
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+DWord
+ DrCC_EditText_GetAllocNum_TextInfo(
+ void )
+{
+ return gdw_alloc_textinfo;
+}
+
+
+
+/*----------------------------------------------------------------------
Alloc
----------------------------------------------------------------------*/
Drd64_Drcc_TextInfo *
DrCC_EditText_FreeTextInfo(
Drd64_Drcc_TextInfo *p_textinfo )
{
- DWord dw_id;
if( NULL == p_textinfo ) { return 0x01; }
if( -1 == p_textinfo->i_id ) { return 0x02; }
/* Clear TextInfo Struct */
- dw_id = (DWord) p_textinfo->i_id;
-
p_textinfo->i_id = -1;
p_textinfo->pb_text = NULL;
- if( dw_id + 1 == gdw_max_textinfo )
- { gdw_max_textinfo--; }
+ gdw_max_textinfo--;
return 0x00;
}
if( NULL == gp_textinfo) { return 0x01; }
-/*
+
for( dw_cnt = gdw_max_textinfo; dw_cnt > 0; dw_cnt-- ) {
p_textinfo = (gp_textinfo + dw_cnt - 1);
assert( NULL != p_textinfo );
p_textinfo->i_id = -1;
}
-*/
+
free( gp_textinfo );
gp_textinfo = NULL;
DRCC_EDITTEXT_EXTERN int DrCC_EditText_Term( void );
DRCC_EDITTEXT_EXTERN int DrCC_EditText_Init( void );
-int DrCC_EditText_FreeTextInfo( Drd64_Drcc_TextInfo *p_textinfo );
+DWord DrCC_EditText_GetMaxNum_TextInfo(void);
+DWord DrCC_EditText_GetAllocNum_TextInfo(void);
Drd64_Drcc_TextInfo *DrCC_EditText_AllocTextInfo( void );
-
-
-
-
+int DrCC_EditText_FreeTextInfo( Drd64_Drcc_TextInfo *p_textinfo );
#endif /* DRD64_HEADER_DRCC_EDITTEXT */
Comment:
----------------------------------------------------------------------*/
-#include"drcc.h"
#define DRD64_SRC_TEST_DRCC_EDITTEXT
#include"test_drcc.h"
+#include"drcc.h"
/* DrCC_EditText_AllocTextInfo ****************************************/
p_tinfo[i_cnt] = NULL;
}
+ CU_ASSERT( 0 == DrCC_EditText_GetMaxNum_TextInfo() );
return;
}