• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AddPart函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: MakeMailFile

int MakeMailFile(struct GroupFolder * folder, STRPTR outbuf, LONG outlen, ULONG MsgNum, BOOL makeDir )
{
	int rc = ERR_OVERFLOW;
	
	DBG_ASSERT(folder != NULL);
	
	*outbuf = 0;
	if(AddPart( outbuf, folder->folder, outlen ))
	{
		if(AddPart( outbuf, strf("%08ld", MsgNum), outlen))
		{
			if(makeDir) {
				/* make sure the folder pointing to this file exists */
				MakeDir( outbuf );
			}
			
			rc = ERR_NOERROR;
			
			hexdump( outbuf, 0, strlen(outbuf)+4);
		}
	}
	
	DBG_STRING(outbuf);
	
	return(rc);
}
开发者ID:diegocr,项目名称:YGRip,代码行数:26,代码来源:mails.c


示例2: pCella

void DdFixedSize::SwapPart(int p1,double *Pos1,int p2,double *Pos2){
  int c1 = pCella(Pos1);
  int c2 = pCella(Pos2);
  if(c1 == c2) return;
  RemPart(p1,c1);
  RemPart(p2,c2);
  AddPart(p1,c2);
  AddPart(p2,c1);
}
开发者ID:sabeiro,项目名称:Allink,代码行数:9,代码来源:Cubo.cpp


示例3: DrawVia

/* ---------------------------------------------------------------------------
 * draw a via object
 */
void
DrawVia (PinType *Via)
{
  AddPart (Via);
  if (!TEST_FLAG (HOLEFLAG, Via) && TEST_FLAG (DISPLAYNAMEFLAG, Via))
    DrawViaName (Via);
}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,代码来源:draw.c


示例4: ami_menu_item_arexx_execute

static void ami_menu_item_arexx_execute(struct Hook *hook, APTR window, struct IntuiMessage *msg)
{
	char *temp;
	struct gui_window_2 *gwin;
	GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);

	if(AslRequestTags(filereq,
						ASLFR_Window, gwin->win,
						ASLFR_SleepWindow, TRUE,
						ASLFR_TitleText, messages_get("NetSurf"),
						ASLFR_Screen, scrn,
						ASLFR_DoSaveMode, FALSE,
						ASLFR_InitialDrawer, nsoption_charp(arexx_dir),
						ASLFR_InitialPattern, "#?.nsrx",
						TAG_DONE))
	{
		if(temp = AllocVecTagList(1024, NULL))
		{
			strlcpy(temp, filereq->fr_Drawer, 1024);
			AddPart(temp, filereq->fr_File, 1024);
			ami_arexx_execute(temp);
			FreeVec(temp);
		}
	}
}
开发者ID:ysei,项目名称:NetSurf,代码行数:25,代码来源:menu.c


示例5: DrawPad

/* ---------------------------------------------------------------------------
 * draw a pad object
 */
void
DrawPad (PadType *Pad)
{
  AddPart (Pad);
  if (doing_pinout || TEST_FLAG (DISPLAYNAMEFLAG, Pad))
    DrawPadName (Pad);
}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,代码来源:draw.c


示例6: L_GetWBArgPath

// Get path from a WBArg
BOOL LIBFUNC L_GetWBArgPath(
	REG(a0, struct WBArg *arg),
	REG(a1, char *buffer),
	REG(d0, long size),
	REG(a6, struct MyLibrary *libbase))
{

	#ifdef __amigaos4__
	libbase = dopuslibbase_global;
	#endif

	// Valid argument?
	if (!arg) return 0;

	// Clear buffer
	*buffer=0;

	// Get path
	if (arg->wa_Lock) L_DevNameFromLockDopus(arg->wa_Lock,buffer,size,libbase);

	// Add filename
	if (arg->wa_Name && *arg->wa_Name) AddPart(buffer,arg->wa_Name,size);

	return (BOOL)*buffer;
}
开发者ID:timofonic,项目名称:dopus5allamigas,代码行数:26,代码来源:misc.c


示例7: ErasePad

/* ---------------------------------------------------------------------------
 * erase a pad object
 */
void
ErasePad (PadType *Pad)
{
  AddPart (Pad);
  if (TEST_FLAG (DISPLAYNAMEFLAG, Pad))
    ErasePadName (Pad);
}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,代码来源:draw.c


示例8: ErasePin

/* ---------------------------------------------------------------------------
 * erase a pin object
 */
void
ErasePin (PinType *Pin)
{
  AddPart (Pin);
  if (TEST_FLAG (DISPLAYNAMEFLAG, Pin))
    ErasePinName (Pin);
}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,代码来源:draw.c


示例9: ami_theme_init

void ami_theme_init(void)
{
	char themefile[1024];
	char searchico[1024];
	BPTR lock = 0;

	strcpy(themefile,nsoption_charp(theme));
	AddPart(themefile,"Theme",100);

	lock = Lock(themefile,ACCESS_READ);

	if(!lock)
	{
		warn_user("ThemeApplyErr",nsoption_charp(theme));
		strcpy(themefile,"PROGDIR:Resources/Themes/Default/Theme");
		nsoption_set_charp(theme, (char *)strdup("PROGDIR:Resources/Themes/Default"));
	}
	else
	{
		UnLock(lock);
	}

	lock = Lock(themefile,ACCESS_READ);
	if(lock)
	{
		UnLock(lock);
		messages_load(themefile);
	}

	ami_get_theme_filename(searchico, "theme_search", false);
	search_default_ico_location = (char *)strdup(searchico);
}
开发者ID:galexcode,项目名称:NetSurf68k,代码行数:32,代码来源:theme.c


示例10: HOOKPROTONHNONP

HOOKPROTONHNONP(TO_NewDrawer, void)
{

    APTR lv_active;
    char newpath[512];
    char dirname[256];
    BPTR lock;
    
    
    strcpy(dirname, (char *)xget(app.st_newdirname, MUIA_String_Contents));
    
    set(app.wi_newdir, MUIA_Window_Open, FALSE);
    
    if (strlen(dirname) <= 0)
        return;
    
    if (app.ActivePanel == PID_Left)
        lv_active = app.lv_left;
    else if (app.ActivePanel == PID_Right)
        lv_active = app.lv_right;
    else
        return;
        
    strcpy(newpath, (char *) xget(lv_active, MUIA_Dirlist_Directory));
    
    AddPart(newpath, dirname, 500);
    
    if ((lock = CreateDir(newpath)) != NULL)
        UnLock(lock);
    
    DoMethod(lv_active, MUIM_Dirlist_ReRead);

}
开发者ID:mattrust,项目名称:amicmd,代码行数:33,代码来源:tools.c


示例11: GatherPVName

static void
GatherPVName (PinType *Ptr)
{
  BoxType box;
  bool vert = TEST_FLAG (EDGE2FLAG, Ptr);

  if (vert)
    {
      box.X1 = Ptr->X - Ptr->Thickness / 2 + Settings.PinoutTextOffsetY;
      box.Y1 = Ptr->Y - Ptr->DrillingHole / 2 - Settings.PinoutTextOffsetX;
    }
  else
    {
      box.X1 = Ptr->X + Ptr->DrillingHole / 2 + Settings.PinoutTextOffsetX;
      box.Y1 = Ptr->Y - Ptr->Thickness / 2 + Settings.PinoutTextOffsetY;
    }

  if (vert)
    {
      box.X2 = box.X1;
      box.Y2 = box.Y1;
    }
  else
    {
      box.X2 = box.X1;
      box.Y2 = box.Y1;
    }
  AddPart (&box);
}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:29,代码来源:draw.c


示例12: GatherPadName

static void
GatherPadName (PadType *Pad)
{
  BoxType box;
  bool vert;

  /* should text be vertical ? */
  vert = (Pad->Point1.X == Pad->Point2.X);

  if (vert)
    {
      box.X1 = Pad->Point1.X                      - Pad->Thickness / 2;
      box.Y1 = MAX (Pad->Point1.Y, Pad->Point2.Y) + Pad->Thickness / 2;
      box.X1 += Settings.PinoutTextOffsetY;
      box.Y1 -= Settings.PinoutTextOffsetX;
      box.X2 = box.X1;
      box.Y2 = box.Y1;
    }
  else
    {
      box.X1 = MIN (Pad->Point1.X, Pad->Point2.X) - Pad->Thickness / 2;
      box.Y1 = Pad->Point1.Y                      - Pad->Thickness / 2;
      box.X1 += Settings.PinoutTextOffsetX;
      box.Y1 += Settings.PinoutTextOffsetY;
      box.X2 = box.X1;
      box.Y2 = box.Y1;
    }

  AddPart (&box);
  return;
}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:31,代码来源:draw.c


示例13: LoadModule

VOID LoadModule( STRPTR Dir, STRPTR Module )
{
    BPTR in = Open( "NIL:", MODE_OLDFILE );
    BPTR out = Open( "NIL:", MODE_OLDFILE );
    BYTE Path[256];
    
    if( !Stricmp( Module, "Random" ))
        Module = RandomModule();
	
    if( !Module )
        return;
    
    strcpy( Path, Dir );
    AddPart( Path, Module, 256 );
    
    if( in && out )
        if( SystemTags( Path, SYS_Asynch, TRUE, SYS_Input, in, SYS_Output, out,
					   TAG_END ) != -1 )
            return;
    
    if( in )
        Close( in );
    if( out )
        Close( out );
}
开发者ID:samskivert,项目名称:garshneblanker,代码行数:25,代码来源:module.c


示例14: ToggleModuleDisabled

VOID ToggleModuleDisabled( BlankerPrefs *Prefs )
{
    struct FileInfoBlock *Blk;
    BPTR BlankerLock;
    BYTE Path[108];
	
    strcpy( Path, Prefs->bp_Dir );
    AddPart( Path, Prefs->bp_Blanker, 108 );
	
    if( BlankerLock = Lock( Path, ACCESS_READ ))
    {
        if( Blk = AllocDosObject( DOS_FIB, 0L ))
        {
            if( Examine( BlankerLock, Blk ))
            {
                if( Stricmp( Blk->fib_Comment, "Disabled" ))
                    SetComment( Path, "Disabled" );
                else
                    SetComment( Path, "" );
            }
            FreeDosObject( DOS_FIB, Blk );
        }
        UnLock( BlankerLock );
    }
}
开发者ID:samskivert,项目名称:garshneblanker,代码行数:25,代码来源:module.c


示例15: load_do

void load_do(const char *filename, struct IconPixmaps *ip)
{
  struct DiskObject *dobj;
#ifdef AMIGAOS
  char fn[256];
  strncpy(fn, prefs.icondir, sizeof(fn)-1);
  fn[sizeof(fn)-1]='\0';
  AddPart(fn,filename,sizeof(fn));
#else
  int rl=strlen(filename)+strlen(prefs.icondir)+2;
#ifdef HAVE_ALLOCA
  char *fn=alloca(rl);
#else
  char fn[1024];
#endif
  sprintf(fn, "%s/%s", prefs.icondir, filename);
#endif
  fn[strlen(fn)-5]=0;
  if((dobj=GetDiskObject(fn))) {
    ip->pm=image_to_pixmap_scr(scr, (struct Image *)dobj->do_Gadget.GadgetRender,
			       dobj->do_Gadget.Width, dobj->do_Gadget.Height, &ip->cs);
    ip->pm2=image_to_pixmap_scr(scr, (struct Image *)dobj->do_Gadget.SelectRender,
				dobj->do_Gadget.Width, dobj->do_Gadget.Height, &ip->cs2);
    FreeDiskObject(dobj);
  } else ip->pm=ip->pm2=None;
}
开发者ID:erikarn,项目名称:amiwm,代码行数:26,代码来源:diskobject.c


示例16: Executable

INLINE STRPTR Executable(struct Task *task)
{
	STRPTR ename = NULL;
	GLOBAL struct DosLibrary * DOSBase;
	
//	ENTER();
	DBG_ASSERT(G->mTask == FindTask(NULL));
	DBG_ASSERT(IsTaskRunning(task)==TRUE);
	
	if((ename = Malloc(1025)))
	{
		struct Process * pr = ((struct Process *)task);
		STRPTR tn = GetTaskName(task, NULL);
		
		if(task->tc_Node.ln_Type != NT_TASK && pr->pr_HomeDir)
		{
			NameFromLock( pr->pr_HomeDir, ename, 1024);
		}
		
		if(tn != NULL)
		{
			AddPart( ename, FilePart(tn), 1024);
			Free(tn);
		}
	}
	
//	DBG_STRING(ename);
	
//	RETURN(ename);
	return(ename);
}
开发者ID:diegocr,项目名称:ZoneAlarm,代码行数:31,代码来源:za_task.c


示例17: ami_file_asl_mime_hook

static const ULONG ami_file_asl_mime_hook(struct Hook *mh,
		struct FileRequester *fr, struct AnchorPathOld *ap)
{
	char fname[1024];
	BOOL ret = FALSE;
	char *mt = NULL;
	lwc_string *lwc_mt = NULL;
	lwc_error lerror;
	content_type ct;

	if(ap->ap_Info.fib_DirEntryType > 0) return(TRUE);

	strcpy(fname,fr->fr_Drawer);
	AddPart(fname,ap->ap_Info.fib_FileName,1024);

  	mt = strdup(fetch_filetype(fname));
	lerror = lwc_intern_string(mt, strlen(mt), &lwc_mt);
	if (lerror != lwc_error_ok)
		return FALSE;

	ct = content_factory_type_from_mime_type(lwc_mt);
	lwc_string_unref(lwc_mt);

	if(ct != CONTENT_NONE) ret = TRUE;

	free(mt);
	return ret;
}
开发者ID:Achal-Aggarwal,项目名称:netsurf,代码行数:28,代码来源:file.c


示例18: EraseArc

/* ---------------------------------------------------------------------------
 * erases an arc on a layer
 */
void
EraseArc (ArcType *Arc)
{
  if (!Arc->Thickness)
    return;
  AddPart (Arc);
}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,代码来源:draw.c


示例19: EraseVia

/* ---------------------------------------------------------------------------
 * erase a via
 */
void
EraseVia (PinType *Via)
{
  AddPart (Via);
  if (TEST_FLAG (DISPLAYNAMEFLAG, Via))
    EraseViaName (Via);
}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,代码来源:draw.c


示例20: strcpy

static const char *fullprogpath(void)
{
	static char path[MAXPATHLEN*2];
	static char prog[MAXPATHLEN];

	BPTR dir;

	extern BOOL from_WB;	/* in main.c */

	// If the program name contains ':' or '/' it's not in the user's path
	// and probably set by using Py_SetProgramName. In that case, just
	// use this. If it exists!
	strcpy(path,Py_GetProgramName());
	if(strchr(path,':') || strchr(path,'/'))
	{
		if(!isxfile(path))
		{
			// Error; the specified file does not exist or is no exe
			path[0]='\0';
		}
		return path;
	}

	// Construct the full path of our executable program.
	if(from_WB)
	{
		/* We're launced from WB, GetProgramName() won't work */
		/* Use WB's argv[0] as the executable path */
		int argc;
		char **argv;
		Py_GetArgcArgv(&argc, &argv);
		if(argc>0)
			strcpy(path,argv[0]);
		else
			strcpy(path,"!error!");
	}
	else
	{
		/* Launced from CLI, use GetProgramName */

		/* However, first check if the specified name exists */
		if(!isxfile(path))
		{
			path[0]='\0';
			return path;
		}

		path[0]=0;
		if(dir=GetProgramDir())
		{
			(void)NameFromLock(dir,path,MAXPATHLEN);
			if(!GetProgramName(prog,MAXPATHLEN))	// this is a dos.library function!
				strcpy(prog,"!error!");
			if(!AddPart(path,prog,MAXPATHLEN*2))
				strcpy(path,"!error!");
		}
	}
	return path;
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:59,代码来源:getpath.c



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AddPath函数代码示例发布时间:2022-05-30
下一篇:
C++ AddParameter函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap