当前位置: 首页>>代码示例>>C++>>正文


C++ AddPart函数代码示例

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


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


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