您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wfree函数代码示例

51自学网 2021-06-03 09:55:24
  C++
这篇教程C++ wfree函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wfree函数的典型用法代码示例。如果您正苦于以下问题:C++ wfree函数的具体用法?C++ wfree怎么用?C++ wfree使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wfree函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: init_xdg_storage

/* (re-)initialize a XDGMenuEntry storage */static void init_xdg_storage(XDGMenuEntry **xdg){	if ((*xdg)->Name)		wfree((*xdg)->Name);	if ((*xdg)->TryExec)		wfree((*xdg)->TryExec);	if ((*xdg)->Exec)		wfree((*xdg)->Exec);	if ((*xdg)->Category)		wfree((*xdg)->Category);	if ((*xdg)->Path)		wfree((*xdg)->Path);	(*xdg)->Name = NULL;	(*xdg)->TryExec = NULL;	(*xdg)->Exec = NULL;	(*xdg)->Category = NULL;	(*xdg)->Path = NULL;	(*xdg)->Flags = 0;	(*xdg)->MatchLevel = -1;}
开发者ID:awmaker,项目名称:awmaker,代码行数:24,


示例2: websSetUserRoles

PUBLIC int websSetUserRoles(char *username, char *roles){    WebsUser    *user;    assert(username &&*username);    if ((user = websLookupUser(username)) == 0) {        return -1;    }    wfree(user->roles);    user->roles = sclone(roles);    computeUserAbilities(user);    return 0;}
开发者ID:JasonCC,项目名称:goahead,代码行数:13,


示例3: _wilddog_conn_deinit

*/Wilddog_Conn_T* WD_SYSTEM _wilddog_conn_deinit(Wilddog_Repo_T*p_repo){    if( !p_repo || !p_repo->p_rp_conn )        return NULL;    /* destory list.*/    _wilddog_cm_ioctl(CM_CMD_DEINIT,p_repo->p_rp_conn->p_cm_l,0);        wfree( p_repo->p_rp_conn);    p_repo->p_rp_conn = NULL;        return NULL;
开发者ID:WildDogTeam,项目名称:wilddog-client-c,代码行数:13,


示例4: paintCursor

static void paintCursor(TextField * tPtr){	int cx;	WMScreen *screen = tPtr->view->screen;	int textWidth;	char *text;	if (tPtr->flags.secure)		text = makeHiddenString(strlen(tPtr->text));	else		text = tPtr->text;	cx = WMWidthOfString(tPtr->font, &(text[tPtr->viewPosition]), tPtr->cursorPosition - tPtr->viewPosition);	switch (tPtr->flags.alignment) {	case WARight:		textWidth = WMWidthOfString(tPtr->font, text, tPtr->textLen);		if (textWidth < tPtr->usableWidth)			cx += tPtr->offsetWidth + tPtr->usableWidth - textWidth + 1;		else			cx += tPtr->offsetWidth + 1;		break;	case WALeft:		cx += tPtr->offsetWidth + 1;		break;	case WAJustified:		/* not supported */	case WACenter:		textWidth = WMWidthOfString(tPtr->font, text, tPtr->textLen);		if (textWidth < tPtr->usableWidth)			cx += tPtr->offsetWidth + (tPtr->usableWidth - textWidth) / 2;		else			cx += tPtr->offsetWidth;		break;	}	/*	   XDrawRectangle(screen->display, tPtr->view->window, screen->xorGC,	   cx, tPtr->offsetWidth, 1,	   tPtr->view->size.height - 2*tPtr->offsetWidth - 1);	   printf("%d %d/n",cx,tPtr->cursorPosition);	 */	XDrawLine(screen->display, tPtr->view->window, screen->xorGC,		  cx, tPtr->offsetWidth, cx, tPtr->view->size.height - tPtr->offsetWidth - 1);	W_SetPreeditPositon(tPtr->view, cx, 0);	if (tPtr->flags.secure) {		wfree(text);	}}
开发者ID:jafd,项目名称:wmaker,代码行数:51,


示例5: wmalloc

WMTextField *WMCreateTextField(WMWidget * parent){	TextField *tPtr;	tPtr = wmalloc(sizeof(TextField));	tPtr->widgetClass = WC_TextField;	tPtr->view = W_CreateView(W_VIEW(parent));	if (!tPtr->view) {		wfree(tPtr);		return NULL;	}	tPtr->view->self = tPtr;	tPtr->view->delegate = &_TextFieldViewDelegate;	tPtr->view->attribFlags |= CWCursor;	tPtr->view->attribs.cursor = tPtr->view->screen->textCursor;	W_SetViewBackgroundColor(tPtr->view, tPtr->view->screen->white);	tPtr->text = wmalloc(MIN_TEXT_BUFFER);	tPtr->textLen = 0;	tPtr->bufferSize = MIN_TEXT_BUFFER;	tPtr->flags.enabled = 1;	WMCreateEventHandler(tPtr->view, ExposureMask | StructureNotifyMask | FocusChangeMask, handleEvents, tPtr);	tPtr->font = WMRetainFont(tPtr->view->screen->normalFont);	tPtr->flags.bordered = DEFAULT_BORDERED;	tPtr->flags.beveled = True;	tPtr->flags.alignment = DEFAULT_ALIGNMENT;	tPtr->offsetWidth = WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font)) / 2, 1);	W_ResizeView(tPtr->view, DEFAULT_WIDTH, DEFAULT_HEIGHT);	WMCreateEventHandler(tPtr->view, EnterWindowMask | LeaveWindowMask			     | ButtonReleaseMask | ButtonPressMask | KeyPressMask | Button1MotionMask,			     handleTextFieldActionEvents, tPtr);	WMAddNotificationObserver(selectionNotification, tPtr->view,				  WMSelectionOwnerDidChangeNotification, (void *)XA_PRIMARY);	WMAddNotificationObserver(realizeObserver, tPtr, WMViewRealizedNotification, tPtr->view);	tPtr->flags.cursorOn = 1;	return tPtr;}
开发者ID:jafd,项目名称:wmaker,代码行数:51,


示例6: wstrdup

char *GetShortcutString(const char *shortcut){	char *buffer = NULL;	char *k;	int control = 0;	char *tmp, *text;	tmp = text = wstrdup(shortcut);	/* get modifiers */	while ((k = strchr(text, '+')) != NULL) {		int mod;		*k = 0;		mod = wXModifierFromKey(text);		if (mod < 0) {			return wstrdup("bug");		}		if (strcasecmp(text, "Meta") == 0) {			buffer = wstrappend(buffer, "M+");		} else if (strcasecmp(text, "Alt") == 0) {			buffer = wstrappend(buffer, "A+");		} else if (strcasecmp(text, "Shift") == 0) {			buffer = wstrappend(buffer, "Sh+");		} else if (strcasecmp(text, "Mod1") == 0) {			buffer = wstrappend(buffer, "M1+");		} else if (strcasecmp(text, "Mod2") == 0) {			buffer = wstrappend(buffer, "M2+");		} else if (strcasecmp(text, "Mod3") == 0) {			buffer = wstrappend(buffer, "M3+");		} else if (strcasecmp(text, "Mod4") == 0) {			buffer = wstrappend(buffer, "M4+");		} else if (strcasecmp(text, "Mod5") == 0) {			buffer = wstrappend(buffer, "M5+");		} else if (strcasecmp(text, "Control") == 0) {			control = 1;		} else {			buffer = wstrappend(buffer, text);		}		text = k + 1;	}	if (control) {		buffer = wstrappend(buffer, "^");	}	buffer = wstrappend(buffer, text);	wfree(tmp);	return buffer;}
开发者ID:cneira,项目名称:wmaker-crm,代码行数:51,


示例7: socketFree

/*    Free a socket structure */PUBLIC void socketFree(int sid){    WebsSocket  *sp;    char        buf[256];    int         i;    if ((sp = socketPtr(sid)) == NULL) {        return;    }    /*        To close a socket, remove any registered interests, set it to non-blocking so that the recv which follows won't        block, do a shutdown on it so peers on the other end will receive a FIN, then read any data not yet retrieved        from the receive buffer, and finally close it.  If these steps are not all performed RESETs may be sent to the        other end causing problems.     */    socketRegisterInterest(sid, 0);    if (sp->sock >= 0) {        socketSetBlock(sid, 0);        while (recv(sp->sock, buf, sizeof(buf), 0) > 0) {}        if (shutdown(sp->sock, SHUT_RDWR) >= 0) {            while (recv(sp->sock, buf, sizeof(buf), 0) > 0) {}        }        closesocket(sp->sock);    }    wfree(sp->ip);    wfree(sp);    socketMax = wfreeHandle(&socketList, sid);    /*        Calculate the new highest socket number     */    socketHighestFd = -1;    for (i = 0; i < socketMax; i++) {        if ((sp = socketList[i]) == NULL) {            continue;        }         socketHighestFd = max(socketHighestFd, sp->sock);    }}
开发者ID:thomasonegd,项目名称:goahead,代码行数:41,


示例8: findCopyFile

static void findCopyFile(const char *dir, const char *file){	char *fullPath;	fullPath = wfindfileinarray(PixmapPath, file);	if (!fullPath) {		wwarning("Could not find file %s", file);		if (ThemePath)			(void)wrmdirhier(ThemePath);		return;	}	wcopy_file(dir, fullPath, file);	wfree(fullPath);}
开发者ID:awmaker,项目名称:awmaker,代码行数:14,


示例9: socket_buffer_delete

voidsocket_buffer_delete(struct socket_buffer *b) {	if (b->head.msg != NULL) {		weenet_message_unref(b->head.msg);		for (size_t i=0, n=b->tail.num; i<n; ++i) {			weenet_message_unref(b->tail.slots[i]);		}	}	if (b->tail.slots != NULL) {		wfree(b->tail.slots);	}	weenet_event_monitor(b->self, 0, b->fd, WEVENT_DELETE, WEVENT_READ);	weenet_event_monitor(b->self, 0, b->fd, WEVENT_DELETE, WEVENT_WRITE);}
开发者ID:kezhuw,项目名称:weenet,代码行数:14,


示例10: WMReleasePixmap

void WMReleasePixmap(WMPixmap * pixmap){	wassertr(pixmap != NULL);	pixmap->refCount--;	if (pixmap->refCount < 1) {		if (pixmap->pixmap)			XFreePixmap(pixmap->screen->display, pixmap->pixmap);		if (pixmap->mask)			XFreePixmap(pixmap->screen->display, pixmap->mask);		wfree(pixmap);	}}
开发者ID:cneira,项目名称:wmaker-crm,代码行数:14,


示例11: WMSetBrowserColumnTitle

void WMSetBrowserColumnTitle(WMBrowser * bPtr, int column, const char *title){	assert(column >= 0);	assert(column < bPtr->usedColumnCount);	if (bPtr->titles[column])		wfree(bPtr->titles[column]);	bPtr->titles[column] = wstrdup(title);	if (COLUMN_IS_VISIBLE(bPtr, column) && bPtr->flags.isTitled) {		drawTitleOfColumn(bPtr, column);	}}
开发者ID:cneira,项目名称:wmaker-crm,代码行数:14,


示例12: free_cached

/** * Map iterator to free cached entries. */static boolfree_cached(void *key, void *value, void *data){	dbmw_t *dw = data;	struct cached *entry = value;	dbmw_check(dw);	g_assert(!entry->len == !entry->data);	free_value(dw, entry, TRUE);	wfree(key, dbmw_keylen(dw, key));	WFREE(entry);	return TRUE;}
开发者ID:Longdengyu,项目名称:gtk-gnutella,代码行数:17,


示例13: websLoginUser

PUBLIC bool websLoginUser(Webs *wp, char *username, char *password){    assert(wp);    assert(wp->route);    assert(username);    assert(password);    if (!wp->route || !wp->route->verify) {        return 0;    }    wfree(wp->username);    wp->username = sclone(username);    wfree(wp->password);    wp->password = sclone(password);    if (!(wp->route->verify)(wp)) {        trace(2, "Password does not match");        return 0;    }    trace(2, "Login successful for %s", username);    websSetSessionVar(wp, WEBS_SESSION_USERNAME, wp->username);                                    return 1;}
开发者ID:Liu1992,项目名称:GasSub_LPC1788,代码行数:23,


示例14: wrealloc

/* * Function:    wrealloc * Description: Realloc the souce pointer's length. * Input:       ptr: old pointer. *              size: new length you want. * Output:      N/A * Return:      New pointer.*/void * WD_SYSTEM wrealloc(void *ptr, size_t oldSize, size_t newSize){#if defined(WILDDOG_PORT_TYPE_QUCETEL) || defined(WILDDOG_PORT_TYPE_ESP)    void* tmpPtr = NULL;#endif    if(!ptr)        return wmalloc(newSize);#if defined(WILDDOG_PORT_TYPE_QUCETEL) || defined(WILDDOG_PORT_TYPE_ESP)    tmpPtr = (void*)wmalloc(newSize);    if(!tmpPtr)    {        wfree(ptr);        return NULL;    }    memcpy(tmpPtr, ptr, oldSize > newSize? (newSize):(oldSize));    wfree(ptr);    return tmpPtr;#else    return realloc( ptr, newSize);#endif}
开发者ID:eagle518,项目名称:wilddog-client-c,代码行数:31,


示例15: endDragProcess

static void endDragProcess(WMDraggingInfo * info, Bool deposited){	WMView *view = XDND_SOURCE_VIEW(info);	WMScreen *scr = W_VIEW_SCREEN(XDND_SOURCE_VIEW(info));	/* free selection handler while view exists */	WMDeleteSelectionHandler(view, scr->xdndSelectionAtom, CurrentTime);	wfree(XDND_SELECTION_PROCS(info));	if (XDND_DRAG_CURSOR(info) != None) {		XFreeCursor(scr->display, XDND_DRAG_CURSOR(info));		XDND_DRAG_CURSOR(info) = None;	}	if (view->dragSourceProcs->endedDrag != NULL) {		/* this can destroy source view (with a "move" action for example) */		view->dragSourceProcs->endedDrag(view, &XDND_DRAG_ICON_POS(info), deposited);	}	/* clear remaining draggging infos */	wfree(XDND_SOURCE_INFO(info));	XDND_SOURCE_INFO(info) = NULL;}
开发者ID:cneira,项目名称:wmaker-crm,代码行数:23,


示例16: WMSetLabelText

void WMSetLabelText(WMLabel * lPtr, const char *text){	if (lPtr->caption)		wfree(lPtr->caption);	if (text != NULL) {		lPtr->caption = wstrdup(text);	} else {		lPtr->caption = NULL;	}	if (lPtr->view->flags.realized) {		paintLabel(lPtr);	}}
开发者ID:awmaker,项目名称:awmaker,代码行数:14,


示例17: free_cached

/** * Map iterator to free cached entries. */static gbooleanfree_cached(gpointer key, gpointer value, gpointer data){	dbmw_t *dw = data;	struct cached *entry = value;	dbmw_check(dw);	g_assert(!entry->len == !entry->data);	free_value(dw, entry, TRUE);	wfree(key, dbmw_keylen(dw, key));	WFREE(entry);	return TRUE;}
开发者ID:Haxe,项目名称:gtk-gnutella,代码行数:17,


示例18: sslFree

PUBLIC void sslFree(Webs *wp){    Nano        *np;        if (wp->ssl) {        np = wp->ssl;        if (np->handle) {            SSL_closeConnection(np->handle);            np->handle = 0;        }        wfree(np);        wp->ssl = 0;    }}
开发者ID:Eric--Zhou,项目名称:goahead,代码行数:14,


示例19: init_mode

static int init_mode(int new_mode, const char *paletname) {    Uint32 mode_flags;    const SDL_VideoInfo *vi;    int las, las2;    int w = (new_mode == SVGA_MODE) ? 800 : 320;    int h = (new_mode == SVGA_MODE) ? 600 : 200;    init_video();    mode_flags = SDL_HWSURFACE | SDL_DOUBLEBUF | SDL_HWPALETTE;    if (!draw_with_vircr_mode)        mode_flags |= SDL_ANYFORMAT;    //if (wantfullscreen)     //   mode_flags |= SDL_FULLSCREEN;    if (draw_with_vircr_mode && pixel_multiplier > 1)        wfree(vircr);    pixel_multiplier = (new_mode == SVGA_MODE) ? pixel_multiplier_svga : pixel_multiplier_vga;    video_state.surface = SDL_SetVideoMode(w * pixel_multiplier, h * pixel_multiplier, 8, mode_flags);    assert(video_state.surface);    if (draw_with_vircr_mode) {        if (pixel_multiplier > 1) {            vircr = (uint8_t *) walloc(w * h);        } else {            vircr = (uint8_t *) video_state.surface->pixels;        }    }    /* else vircr is preallocated in init_video */    vi = SDL_GetVideoInfo();    video_state.haverealpalette = (vi->vfmt->palette != NULL);    dksopen(paletname);    dksread(ruutu.normaalipaletti, sizeof(ruutu.normaalipaletti));    for (las = 0; las < 256; las++)        for (las2 = 0; las2 < 3; las2++)            ruutu.paletti[las][las2] = ruutu.normaalipaletti[las][las2];    dksclose();    setpal_range(ruutu.paletti, 0, 256);    all_bitmaps_refresh();    current_mode = new_mode;    return 1;}
开发者ID:Gendron5000,项目名称:triplane,代码行数:50,


示例20: wmalloc

WMRuler *WMCreateRuler(WMWidget * parent){	Ruler *rPtr = wmalloc(sizeof(Ruler));	unsigned int w = WMWidgetWidth(parent);	rPtr->widgetClass = WC_Ruler;	rPtr->view = W_CreateView(W_VIEW(parent));	if (!rPtr->view) {		wfree(rPtr);		return NULL;	}	rPtr->view->self = rPtr;	rPtr->drawBuffer = (Pixmap) NULL;	W_ResizeView(rPtr->view, w, 40);	WMCreateEventHandler(rPtr->view, ExposureMask | StructureNotifyMask			     | EnterWindowMask | LeaveWindowMask | FocusChangeMask			     | ButtonReleaseMask | ButtonPressMask | KeyReleaseMask			     | KeyPressMask | Button1MotionMask, handleEvents, rPtr);	rPtr->view->delegate = &_RulerViewDelegate;	rPtr->fg = WMBlackColor(rPtr->view->screen);	rPtr->fgGC = WMColorGC(rPtr->fg);	rPtr->bgGC = WMColorGC(WMGrayColor(rPtr->view->screen));	rPtr->font = WMSystemFontOfSize(rPtr->view->screen, 8);	rPtr->offset = 22;	rPtr->margins.left = 22;	rPtr->margins.body = 22;	rPtr->margins.first = 42;	rPtr->margins.right = (w < 502 ? w : 502);	rPtr->margins.tabs = NULL;	rPtr->flags.whichMarker = 0;	/* none */	rPtr->flags.buttonPressed = False;	rPtr->flags.redraw = True;	rPtr->moveAction = NULL;	rPtr->releaseAction = NULL;	rPtr->pview = W_VIEW(parent);	return rPtr;}
开发者ID:awmaker,项目名称:awmaker,代码行数:50,


示例21: FreeDataItem

// free the data item by using empty string// Item = the item to freevoid FreeDataItem(WIDATAITEM *Item){	wfree(&Item->Name);	wfree(&Item->Start);	wfree(&Item->End);	wfree(&Item->Unit);	wfree(&Item->Url);	wfree(&Item->Break);}
开发者ID:ybznek,项目名称:miranda-ng,代码行数:11,


示例22: wWorkspaceNew

int wWorkspaceNew(WScreen *scr){	WWorkspace *wspace, **list;	int i;	if (w_global.workspace.count < MAX_WORKSPACES) {		w_global.workspace.count++;		wspace = wmalloc(sizeof(WWorkspace));		wspace->name = NULL;		wspace->clip = NULL;		if (!wspace->name) {			static const char *new_name = NULL;			static size_t name_length;			if (new_name == NULL) {				new_name = _("Workspace %i");				name_length = strlen(new_name) + 8;			}			wspace->name = wmalloc(name_length);			snprintf(wspace->name, name_length, new_name, w_global.workspace.count);		}		if (!wPreferences.flags.noclip)			wspace->clip = wDockCreate(scr, WM_CLIP, NULL);		list = wmalloc(sizeof(WWorkspace *) * w_global.workspace.count);		for (i = 0; i < w_global.workspace.count - 1; i++)			list[i] = w_global.workspace.array[i];		list[i] = wspace;		if (w_global.workspace.array)			wfree(w_global.workspace.array);		w_global.workspace.array = list;		wWorkspaceMenuUpdate(w_global.workspace.menu);		wWorkspaceMenuUpdate(w_global.clip.ws_menu);		wNETWMUpdateDesktop(scr);		WMPostNotificationName(WMNWorkspaceCreated, scr, (void *)(uintptr_t) (w_global.workspace.count - 1));		XFlush(dpy);		return w_global.workspace.count - 1;	}	return -1;}
开发者ID:jafd,项目名称:wmaker,代码行数:49,


示例23: PropSetIconTileHint

void PropSetIconTileHint(virtual_screen *vscr, RImage *image){	static Atom imageAtom = 0;	unsigned char *tmp;	int x, y;	if (vscr->screen_ptr->info_window == None)		return;	if (!imageAtom) {		/*		 * WIDTH, HEIGHT (16 bits, MSB First)		 * array of R,G,B,A bytes		 */		imageAtom = XInternAtom(dpy, "_RGBA_IMAGE", False);	}	tmp = malloc(image->width * image->height * 4 + 4);	if (!tmp) {		wwarning("could not allocate memory to set _WINDOWMAKER_ICON_TILE hint");		return;	}	tmp[0] = image->width >> 8;	tmp[1] = image->width & 0xff;	tmp[2] = image->height >> 8;	tmp[3] = image->height & 0xff;	if (image->format == RRGBAFormat) {		memcpy(&tmp[4], image->data, image->width * image->height * 4);	} else {		char *ptr = (char *)(tmp + 4);		char *src = (char *)image->data;		for (y = 0; y < image->height; y++) {			for (x = 0; x < image->width; x++) {				*ptr++ = *src++;				*ptr++ = *src++;				*ptr++ = *src++;				*ptr++ = 255;			}		}	}	XChangeProperty(dpy, vscr->screen_ptr->info_window, w_global.atom.wmaker.icon_tile,			imageAtom, 8, PropModeReplace, tmp, image->width * image->height * 4 + 4);	wfree(tmp);}
开发者ID:awmaker,项目名称:awmaker,代码行数:49,


示例24: MountISO

char* MountISO(const char* path){	VIRTUAL_STORAGE_TYPE vtype = { 1, VIRTUAL_STORAGE_TYPE_VENDOR_MICROSOFT };	ATTACH_VIRTUAL_DISK_PARAMETERS vparams = {0};	DWORD r;	wchar_t wtmp[128];	ULONG size = ARRAYSIZE(wtmp);	wconvert(path);	char* ret = NULL;	PF_INIT_OR_OUT(OpenVirtualDisk, VirtDisk);	PF_INIT_OR_OUT(AttachVirtualDisk, VirtDisk);	PF_INIT_OR_OUT(GetVirtualDiskPhysicalPath, VirtDisk);	if ((mounted_handle != NULL) && (mounted_handle != INVALID_HANDLE_VALUE))		UnMountISO();	r = pfOpenVirtualDisk(&vtype, wpath, VIRTUAL_DISK_ACCESS_READ | VIRTUAL_DISK_ACCESS_GET_INFO,		OPEN_VIRTUAL_DISK_FLAG_NONE, NULL, &mounted_handle);	if (r != ERROR_SUCCESS) {		SetLastError(r);		uprintf("Could not open ISO '%s': %s", path, WindowsErrorString());		goto out;	}	vparams.Version = ATTACH_VIRTUAL_DISK_VERSION_1;	r = pfAttachVirtualDisk(mounted_handle, NULL, ATTACH_VIRTUAL_DISK_FLAG_READ_ONLY |		ATTACH_VIRTUAL_DISK_FLAG_NO_DRIVE_LETTER, 0, &vparams, NULL);	if (r != ERROR_SUCCESS) {		SetLastError(r);		uprintf("Could not mount ISO '%s': %s", path, WindowsErrorString());		goto out;	}	r = pfGetVirtualDiskPhysicalPath(mounted_handle, &size, wtmp);	if (r != ERROR_SUCCESS) {		SetLastError(r);		uprintf("Could not obtain physical path for mounted ISO '%s': %s", path, WindowsErrorString());		goto out;	}	wchar_to_utf8_no_alloc(wtmp, physical_path, sizeof(physical_path));	ret = physical_path;out:	if (ret == NULL)		UnMountISO();	wfree(path);	return ret;}
开发者ID:DesignD,项目名称:rufus,代码行数:49,


示例25: processAll

/** * This function executes the extraction process. * * @param infos Informations about the launch process. */void processAll(t_launch_infos *infos){  t_binary_image *pic;  SDL_Surface *image;  t_cc_list *cc_list;    pic = NULL;  image = NULL;  image = SDL_LoadBMP(infos->inFile);  if (image != NULL)    {       if (infos->verbose)	printf("/n >> Image %s loaded./n", infos->inFile);      pic = bitmap_to_binaryimage(image,infos->inFile);      if (pic != NULL)	{ 	  if (infos->verbose)	    printf(" >> Binarization done./n");	  cc_list = findCC(pic->matrix);	  if (cc_list != NULL)	    {	      checkIfCharacter(cc_list, pic->height, pic->width);	      if (infos->verbose)		printf(" >> Extraction of %d characters done./n", cc_list->nbcc);	      updateCC(cc_list);	      exportCC(cc_list, pic);	      	      /*traceCC(image, cc_list); */	      if (SDL_SaveBMP(image, infos->outFile) < 0)		fprintf(stderr," > SDL BMP saving error </n");	      else		if (infos->verbose)		  printf(" >> Image %s saved./n/n", infos->outFile);	      /* free_listCC(cc_list) */	      free_pic(pic);	    }	}      SDL_FreeSurface(image);    }  else    {      fprintf(stderr, " > SDL BMP Loader error </n");      wfree(infos);      exit(EXIT_FAILURE);    }}
开发者ID:wavs,项目名称:ocre,代码行数:54,


示例26: websCgiPoll

/*    Any entry in the cgiList need to be checked to see if it has completed, and if so, process its output and clean up.    Return time till next poll. */WebsTime websCgiPoll(){    Webs    *wp;    Cgi     *cgip;    char    **ep;    int     cid, nTries;    for (cid = 0; cid < cgiMax; cid++) {        if ((cgip = cgiList[cid]) != NULL) {            wp = cgip->wp;            websCgiGatherOutput(cgip);            if (checkCgi(cgip->handle) == 0) {                /*                    We get here if the CGI process has terminated. Clean up.                 */                for (nTries = 0; (cgip->fplacemark == 0) && (nTries < 100); nTries++) {                    websCgiGatherOutput(cgip);                    /*                                           There are some cases when we detect app exit before the file is ready.                      */                    if (cgip->fplacemark == 0) {#if WINDOWS                        Sleep(10);#endif                    }                }                if (cgip->fplacemark == 0) {                    websError(wp, HTTP_CODE_INTERNAL_SERVER_ERROR, "CGI generated no output");                } else {                    trace(5, "cgi: Request complete - calling websDone");                    websDone(wp);                }                /*                    Remove the temporary re-direction files                 */                unlink(cgip->stdIn);                unlink(cgip->stdOut);                /*                    Free all the memory buffers pointed to by cgip. The stdin file name (wp->cgiStdin) gets freed as                    part of websFree().                 */                cgiMax = wfreeHandle(&cgiList, cid);                for (ep = cgip->envp; ep != NULL && *ep != NULL; ep++) {                    wfree(*ep);                }                wfree(cgip->cgiPath);                wfree(cgip->argp);                wfree(cgip->envp);                wfree(cgip->stdOut);                wfree(cgip);                websPump(wp);            }        }    }    return cgiMax ? 10 : MAXINT;}
开发者ID:Truhigh,项目名称:goahead,代码行数:60,


示例27: freeMemcacheData

void freeMemcacheData(void *d){    struct memcacheProcData *data = d;    if (data->command)        wstrFree(data->command);    if (data->key)        wstrFree(data->key);    if (data->keys) {        arrayEach(data->keys, freeKey);        arrayDealloc(data->keys);    }    if (data->vals)        arrayDealloc(data->vals);    wfree(d);}
开发者ID:clareSun,项目名称:wheatserver,代码行数:15,



注:本文中的wfree函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wgetch函数代码示例
C++ wf_invalidate_region函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。