HObj CreateHObjFromImgFile(const char *path) { HObj obj; unsigned int err = 0; unsigned int uid = GetExtUidByFileName(path); if (uid >= UID_BMX && uid <= UID_SVG) { #ifdef NEWSGOLD obj = Obs_CreateObject(uid, 0x2D, 0, 0x80A8, 1, 1, &err); #else obj = Obs_CreateObject(uid, 0x29, 2, 0x1C7, 1, 1, &err); #endif if (err) return -1; unsigned int len = strlen(path); WSHDR *ws = AllocWS(len); str_2ws (ws, path, len); Obs_SetInput_File(obj, 0, ws); FreeWS(ws); Obs_GetInfo(obj, 0); return obj; } return -1; }
void Clear(void) { CLIPBOARD_LIST *next; while (top) { next = top->next; FreeWS(top->ws); mfree(top); top = next; } }
static void Send(GUI *data) { unsigned int i = GetCurMenuItem(tab_tracks_gui); DIR_ENTRY_LIST *ptr = APlayer_GetPtr(i); WSHDR *fname, *dir; int len; len = strlen(ptr->fname); fname = AllocWS(len); str_2ws(fname, ptr->fname, len); len = strlen(ptr->dir); dir = AllocWS(len); str_2ws(dir, ptr->dir, len); MediaSendCSM_Open(fname, dir); FreeWS(fname); FreeWS(dir); GeneralFuncF1(2); }
void FreeID3(ID3 *id3) { if (id3->title) FreeWS(id3->title); if (id3->album) FreeWS(id3->album); if (id3->artist) FreeWS(id3->artist); if (id3->year) FreeWS(id3->year); if (id3->comment) FreeWS(id3->comment); if (id3->track) FreeWS(id3->track); if (id3->genre) FreeWS(id3->genre); }
void DoConfig (){ WSHDR *ws=AllocWS (256); str_2ws(ws,GetConfigName(), 256); ExecuteFile(ws, NULL, NULL); FreeWS(ws); }