这篇教程C++ AddPart函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AddPart函数的典型用法代码示例。如果您正苦于以下问题:C++ AddPart函数的具体用法?C++ AddPart怎么用?C++ AddPart使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AddPart函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: MakeMailFileint 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,
示例2: pCellavoid 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,
示例3: DrawVia/* --------------------------------------------------------------------------- * draw a via object */voidDrawVia (PinType *Via){ AddPart (Via); if (!TEST_FLAG (HOLEFLAG, Via) && TEST_FLAG (DISPLAYNAMEFLAG, Via)) DrawViaName (Via);}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,
示例4: ami_menu_item_arexx_executestatic 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,
示例5: DrawPad/* --------------------------------------------------------------------------- * draw a pad object */voidDrawPad (PadType *Pad){ AddPart (Pad); if (doing_pinout || TEST_FLAG (DISPLAYNAMEFLAG, Pad)) DrawPadName (Pad);}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,
示例6: L_GetWBArgPath// Get path from a WBArgBOOL 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,
示例7: ErasePad/* --------------------------------------------------------------------------- * erase a pad object */voidErasePad (PadType *Pad){ AddPart (Pad); if (TEST_FLAG (DISPLAYNAMEFLAG, Pad)) ErasePadName (Pad);}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,
示例8: ErasePin/* --------------------------------------------------------------------------- * erase a pin object */voidErasePin (PinType *Pin){ AddPart (Pin); if (TEST_FLAG (DISPLAYNAMEFLAG, Pin)) ErasePinName (Pin);}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,
示例9: ami_theme_initvoid 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,
示例10: HOOKPROTONHNONPHOOKPROTONHNONP(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,
示例11: GatherPVNamestatic voidGatherPVName (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,
示例12: GatherPadNamestatic voidGatherPadName (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,
示例13: LoadModuleVOID 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,
示例14: ToggleModuleDisabledVOID 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,
示例15: load_dovoid 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,
示例16: ExecutableINLINE 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,
示例17: ami_file_asl_mime_hookstatic 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,
示例18: EraseArc/* --------------------------------------------------------------------------- * erases an arc on a layer */voidEraseArc (ArcType *Arc){ if (!Arc->Thickness) return; AddPart (Arc);}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,
示例19: EraseVia/* --------------------------------------------------------------------------- * erase a via */voidEraseVia (PinType *Via){ AddPart (Via); if (TEST_FLAG (DISPLAYNAMEFLAG, Via)) EraseViaName (Via);}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:10,
示例20: strcpystatic 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,
示例21: AslFileSTRPTR AslFile( STRPTR TitleText, STRPTR InitialPattern ){ struct Library * AslBase; STRPTR name = NULL; ENTER(); if((AslBase = OpenLibrary("asl.library", 0))) { struct FileRequester *freq; if((freq = AllocAslRequestTags(ASL_FileRequest, TAG_DONE))) { if(AslRequestTags(freq, ASLFR_TitleText, (ULONG)TitleText, ASLFR_InitialDrawer, (ULONG)GetString(AslFilePath,"PROGDIR:"), ASLFR_RejectIcons, TRUE, InitialPattern != NULL ? ASLFR_DoPatterns:TAG_IGNORE, TRUE, InitialPattern != NULL ? ASLFR_InitialPattern:TAG_IGNORE, (ULONG)InitialPattern, TAG_DONE)) { ULONG namelen; namelen = strlen(freq->fr_File) + strlen(freq->fr_Drawer) + 32; if((name = AllocVec(namelen + 1, MEMF_PUBLIC | MEMF_CLEAR))) { AddPart(name, freq->fr_Drawer, namelen); AddPart(name, freq->fr_File, namelen); set( AslFilePath, MUIA_String_Contents,(ULONG)freq->fr_Drawer); } } FreeAslRequest(freq); } else ShowError("Cannot alloc AslRequest!"); CloseLibrary( AslBase ); } else ShowError("Cannot open %s","asl.library"); DBG_STRING(name); return name;}
开发者ID:diegocr,项目名称:AISSTBC,代码行数:46,
示例22: function_build_dest// Build destination pathvoid function_build_dest( FunctionHandle *handle, FunctionEntry *entry, char *buffer){ strcpy(buffer,handle->dest_path); AddPart(buffer,entry->name,256);}
开发者ID:timofonic,项目名称:dopus5allamigas,代码行数:9,
示例23: DrawPin/* --------------------------------------------------------------------------- * draw a pin object */voidDrawPin (PinType *Pin){ AddPart (Pin); if ((!TEST_FLAG (HOLEFLAG, Pin) && TEST_FLAG (DISPLAYNAMEFLAG, Pin)) || doing_pinout) DrawPinName (Pin);}
开发者ID:bgamari,项目名称:geda-pcb,代码行数:11,
示例24: AddPartvoid DdLinkedList::CheckMirror(int p){ int NCellMirror = 0; for(int d=0;d<3;d++){ double Pos[3] = {Pc[p].Pos[0],Pc[p].Pos[1],Pc[p].Pos[2]}; int cd[3] = {Pc[p].Cell[0],Pc[p].Cell[1],Pc[p].Cell[2]}; if(Pc[p].Pos[d] - CutOff < 0.){ Pos[d] = Pc[p].Pos[d] - CutOff; cd[d] -= 1; AddPart(p,cd,Pos); } else if(Edge[d] - Pc[p].Pos[d] < CutOff){ Pos[d] = Pc[p].Pos[d] + CutOff; cd[d] += 1; AddPart(p,cd,Pos); } }}
开发者ID:sabeiro,项目名称:Allink,代码行数:17,
示例25: pCellavoid DdLinkedList::MovePart(const int p,double *OldPos,double *NewPos){ int cd[3]; int cn = pCella(NewPos,cd); int co = pCella(OldPos); SetCoorNumb(NewPos,p); if(cn == co) return ; RemPart(p,co); AddPart(p,cd);}
开发者ID:sabeiro,项目名称:Allink,代码行数:9,
示例26: LoadConvFilterint LoadConvFilter( struct PPTBase *PPTBase, char *name, struct convargs *cargs ){ BPTR fh; APTR DOSBase = PPTBase->lb_DOS; char buf[128], *s, namebuf[256]; int i,line = 0; BOOL quit = FALSE; /* * Attempts to open files at the following order: * 1. filename * 2. PROGDIR:modules/convolutions/filename */ fh = Open(name, MODE_OLDFILE); if(!fh) { strcpy( namebuf, "PROGDIR:modules/convolutions" ); AddPart(namebuf, name, 255); if( !(fh = Open(namebuf, MODE_OLDFILE)) ) { return PERR_FILEOPEN; } } while(!quit) { if(FGets( fh, buf, 127 ) == NULL) quit = TRUE; else { if(buf[0] != ';' && buf[0] != '/n' && buf[0] != '/0') { char *f; switch(line) { case 0: cargs->size = atoi(buf); break; case 1: cargs->bias = atoi(buf); break; case 2: cargs->div = atoi(buf); break; default: s = &buf[0]; for(i = 0; i < 7; i++) { f = strchr(s,' '); if(f) *f = '/0'; cargs->weights[line-3][i] = atoi(s); s = f+1; } break; } line++; } } } Close(fh); return PERR_OK;}
开发者ID:jalkanen,项目名称:ppt,代码行数:57,
注:本文中的AddPart函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ AddPath函数代码示例 C++ AddParameter函数代码示例 |