當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。