test.c
typedef struct
{
int cnt;
long dat[12];
}can_mon_buf;
can_mon_buf mon_jstand[10];
void mon_buf_hold(int pat)
{
int i;
/* 初期化 */
static bool inifinflg = FALSE;
if (TRUE != inifinflg){
memset((char*)&mon_jstand, 0x00, sizeof(mon_jstand));
initfinflg = TRUE;
}
i = mon_jstand[pat].cnt;
if (12 >= i){
mon_jstand[pat].dat[i] = dat;
}else{
mon_jstand[pat].cnt++;
}
}