int maincsm_onmessage(CSM_RAM* data, GBS_MSG* msg) { if (msg->msg == MSG_IPC) { IPC_REQ *ipc = (IPC_REQ*)msg->data0; if (ipc) { if (strcmp(ipc->name_to, IPC_MY_NAME) == 0) { if (msg->submess != data->id) { LockSched(); CloseCSM(msg->submess); SUBPROC((void*)CreateClipperGUI); UnlockSched(); } } } } if (msg->msg == MSG_RECONFIGURE_REQ) { if (strcmp_nocase(successed_config_filename, (char *)msg->data0) == 0) InitConfig(); } if (total < cfg_max_history) { static WSHDR *clip; if (not_reading) { clip = GetClipBoard(); not_reading = 0; } else { if (clip != GetClipBoard()) { clip = GetClipBoard(); if (total) { CLIPBOARD_LIST *p = top; while (1) { if (p->next) p = p->next; else break; } p->next = malloc(sizeof(CLIPBOARD_LIST)); p = p->next; last->next = p; p->prev = last; p->next = NULL; p->ws = AllocWS(clip->wsbody[0] + 1); wstrcpy(p->ws, clip); last = p; } else { top = malloc(sizeof(CLIPBOARD_LIST)); top->prev = NULL; top->next = NULL; last = top; top->ws = AllocWS(clip->wsbody[0] + 1); wstrcpy(top->ws, clip); } total++; } } } return 1; }
__arm void SUBPROC_a(void *elf, void *param) { SUBPROC(elf, param); }
void DoGetFF() { SUBPROC((void *)GetFF); }