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

C++ Abort函数代码示例

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

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



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

示例1: GetKineticEnergyMatrix

//B*ddq + C*dq = fext
void DynamicChain2D::GetAcceleration(Vector& ddq, const Vector& fext)
{
	Matrix B;
	GetKineticEnergyMatrix(B);
	CholeskyDecomposition<Real> cholesky;
	if(!cholesky.set(B)) {
		LOG4CXX_ERROR(KrisLibrary::logger(),"Kinetic energy matrix is not positive definite!");
		LOG4CXX_ERROR(KrisLibrary::logger(),B);
		Abort();
	}

	Vector Cdq;
	GetCoriolisForces(Cdq);
	Vector f_Cdq;
	if(fext.n==0) f_Cdq.setNegative(Cdq);
	else f_Cdq.sub(fext,Cdq);
	cholesky.backSub(f_Cdq,ddq);
}
开发者ID:krishauser,项目名称:KrisLibrary,代码行数:19,代码来源:DynamicChain.cpp


示例2: Abort

void ExecutionDialog::OnCancel(wxCommandEvent &ev)
{
	if (thread)
	{
		btnCancel->Disable();
		Abort();
		btnCancel->Enable();
		btnOK->Enable();
	}
	else
	{
		delete conn;
		if (IsModal())
			EndModal(-1);
		else
			Destroy();
	}
}
开发者ID:GHnubsST,项目名称:pgadmin3,代码行数:18,代码来源:dlgClasses.cpp


示例3: Abort

bool CDVDDemuxClient::Open(CDVDInputStream* pInput)
{
  Abort();

  m_pInput = pInput;
  m_IDemux = dynamic_cast<CDVDInputStream::IDemux*>(m_pInput);
  if (!m_IDemux)
    return false;

  if (!m_IDemux->OpenDemux())
    return false;

  RequestStreams();

  m_displayTime = 0;
  m_dtsAtDisplayTime = DVD_NOPTS_VALUE;
  return true;
}
开发者ID:FLyrfors,项目名称:xbmc,代码行数:18,代码来源:DVDDemuxClient.cpp


示例4: DoDirControl

private func DoDirControl(int iDir)
  {
  // Abbruch, wenn das Zielobjekt weg ist
  if (!pTargetObject) return(Abort());
  // Richtungsänderung?
  if (iDir != GetDir(pTargetObject))
    {
    iAngle=-iAngle;
    pTargetObject->SetDir(iDir);
    pArrow->UpdateAngle(iAngle);
    pTargetObject->~AimingAngle(iAngle);
    }
  else
    // Tastendruck in Zielrichtung: Zaubern! - nicht bei tumble!
    if(!(GetAction(pTargetObject) S= "Tumble"))
     DoEnter();
  return(1);
  }
开发者ID:Meowtimer,项目名称:ChangingWorldRed,代码行数:18,代码来源:fix_Aimer.c


示例5: lock

ulen Sem::begin_give_many(ulen dcount)
 {
  FastMutex::Lock lock(mutex);
   
  if( take_count<dcount )
    {
     dcount-=take_count;
      
     if( UIntAdd(count,dcount) ) Abort("Fatal error : CCore::Sem counter add overflow");
     
     return Replace_null(take_count);
    }
  else
    {
     take_count-=dcount;
     
     return dcount;
    }  
 }
开发者ID:SergeyStrukov,项目名称:CCore,代码行数:19,代码来源:Sem.cpp


示例6: runtime_get_windowing_system

void
BitmapImage::CreateLoader (unsigned char *buffer)
{
	if (!(moonlight_flags & RUNTIME_INIT_ALL_IMAGE_FORMATS)) {
		// 89 50 4E 47 == png magic
		if (buffer[0] == 0x89)
			loader = runtime_get_windowing_system()->CreatePixbufLoader ("png");
		// ff d8 ff e0 == jfif magic
		else if (buffer[0] == 0xff)
			loader = runtime_get_windowing_system()->CreatePixbufLoader ("jpeg");

		else {
			Abort ();
			moon_error = new MoonError (MoonError::EXCEPTION, 4001, "unsupported image type");
		}
	} else {
		loader = runtime_get_windowing_system()->CreatePixbufLoader (NULL);
	}
}
开发者ID:lewing,项目名称:moon,代码行数:19,代码来源:bitmapimage.cpp


示例7: ValidateMaskEditT

void ValidateMaskEditT(UnicodeString Mask, TEditControl *Edit, int ForceDirectoryMasks)
{
  DebugAssert(Edit != nullptr);
  TFileMasks Masks(ForceDirectoryMasks);
  try
  {
    Masks = Mask;
  }
  catch (EFileMasksException &E)
  {
    ShowExtendedException(&E);
    Edit->SetFocus();
    // This does not work for TEdit and TMemo (descendants of TCustomEdit) anymore,
    // as it re-selects whole text on exception in TCustomEdit.CMExit
//    Edit->SelStart = E.ErrorStart - 1;
//    Edit->SelLength = E.ErrorLen;
    Abort();
  }
}
开发者ID:michaellukashov,项目名称:Far-NetBox,代码行数:19,代码来源:FarInterface.cpp


示例8: permute_one

static void
permute_one (void *arg, transition_info_t *ti, state_data_t dst, int *cpy)
{

    (void) cpy;

    permute_t          *perm = (permute_t*) arg;
    int                 seen;
    seen = state_info_new_state (perm->next, dst, ti, perm->state);
    if (EXPECT_FALSE(seen < 0)) {
        global->exit_status = LTSMIN_EXIT_FAILURE;
        if (run_stop(perm->run_ctx)) {
            Warning (info, "Error: %s full! Change -s/--ratio.",
                           state_store_full_msg(seen));
        }
        return;
    }
    switch (perm->permutation) {
    case Perm_Shift:
        if (ti->group < perm->start_group) {
            perm_todo (perm, ti, seen);
            break;
        } else // fall through
    case Perm_None:
        perm->real_cb (perm->call_ctx, perm->next, ti, seen);
        ti->por_proviso &= perm->por_proviso;
        break;
    case Perm_Shift_All:
        if (0 == perm->start_group_index && ti->group >= perm->start_group)
            perm->start_group_index = perm->nstored;
        // fall through
    case Perm_Dynamic:
    case Perm_Random:
    case Perm_SR:
    case Perm_RR:
    case Perm_Otf:
    case Perm_Sort:
        perm_todo (perm, ti, seen);
        break;
    default:
        Abort ("Unknown permutation!");
    }
}
开发者ID:alaarman,项目名称:ltsmin,代码行数:43,代码来源:permute.c


示例9: Abort

void
SpeechRecognition::ProcessTestEventRequest(nsISupports* aSubject,
                                           const nsAString& aEventName)
{
  if (aEventName.EqualsLiteral("EVENT_ABORT")) {
    Abort();
  } else if (aEventName.EqualsLiteral("EVENT_AUDIO_ERROR")) {
    DispatchError(
      SpeechRecognition::EVENT_AUDIO_ERROR,
      SpeechRecognitionErrorCode::Audio_capture, // TODO different codes?
      NS_LITERAL_STRING("AUDIO_ERROR test event"));
  } else {
    NS_ASSERTION(StaticPrefs::MediaWebspeechTextFakeRecognitionService(),
                 "Got request for fake recognition service event, but "
                 "media.webspeech.test.fake_recognition_service is unset");

    // let the fake recognition service handle the request
  }
}
开发者ID:heiher,项目名称:gecko-dev,代码行数:19,代码来源:SpeechRecognition.cpp


示例10: TopDecls

/* parse and translate global declarations */
void TopDecls(void)
{
    printf(".section .data\n");
    char tmp_buf[MAX_BUF];
    while(Look != 'B') {
        switch(Look) {
            case 'b':
            case 'w':
            case 'l':
                Decl();
                break;
            default:
                sprintf(tmp_buf, "Unrecognized keyword %c", Look);
                Abort(tmp_buf);
                break;
        }
        Fin();
    }
}
开发者ID:A-deLuna,项目名称:Let-s-build-a-compiler,代码行数:20,代码来源:main.c


示例11: put_at_chunk

static void put_at_chunk(value_table_t vt,chunk item,value_index_t index){
    SIputCAt(vt->index,item.data,item.len,index);

    if (HREme(vt->ctx)!=0) {
        Debug("validating at owner chunk %s at %u",item.data, index);
        if (vt->msg_pending) {
            Debug("waiting for msg (%x/%d) %s",vt->msg_pending,vt->msg_pending,vt->msg->buffer+4);
            HREyieldWhile(vt->ctx,&vt->msg_pending);
        }
        Debug("preparing message");
        int32_t tmp = -2 - index;
        if (item.len>MAX_CHUNK_SIZE) Abort("chunk length %d exceeds maximum (%d).",item.len,MAX_CHUNK_SIZE);
        memcpy(vt->msg->buffer,&tmp,4);
        memcpy(vt->msg->buffer+4,item.data,item.len);
        vt->msg->tail=item.len+4;
        vt->msg_pending=1;
        HREpostSend(vt->msg);
    }
}
开发者ID:graydon,项目名称:ltsmin,代码行数:19,代码来源:hre_table.c


示例12: FMTLOAD

//---------------------------------------------------------------------------
void __fastcall TWinInteractiveCustomCommand::Prompt(
  const UnicodeString & Prompt, UnicodeString & Value)
{
  UnicodeString APrompt = Prompt;
  if (APrompt.IsEmpty())
  {
    APrompt = FMTLOAD(CUSTOM_COMMANDS_PARAM_PROMPT, (FCustomCommandName));
  }
  TStrings * History = CustomWinConfiguration->History[L"CustomCommandParam"];
  if (InputDialog(FMTLOAD(CUSTOM_COMMANDS_PARAM_TITLE, (FCustomCommandName)),
        APrompt, Value, HELP_CUSTOM_COMMAND_PARAM, History))
  {
    CustomWinConfiguration->History[L"CustomCommandParam"] = History;
  }
  else
  {
    Abort();
  }
}
开发者ID:mpmartin8080,项目名称:winscp,代码行数:20,代码来源:WinInterface.cpp


示例13: rec_ndfs_call

void
rec_ndfs_call (wctx_t *ctx, ref_t state)
{
    cndfs_alg_local_t  *cloc = (cndfs_alg_local_t *) ctx->local;
    alg_global_t       *sm = ctx->global;
    strategy_t          rec_strat = get_strategy (ctx->run->shared->rec->alg);
    dfs_stack_push (sm->rec->local->stack, (int*)&state);
    cloc->counters.rec++;
    switch (rec_strat) {
    case Strat_ENDFS:
       endfs_blue (sm->rec->run, sm->rec); break;
    case Strat_LNDFS:
       lndfs_blue (sm->rec->run, sm->rec); break;
    case Strat_NDFS:
       ndfs_blue (sm->rec->run, sm->rec); break;
    default:
       Abort ("Invalid recursive strategy.");
    }
}
开发者ID:Meijuh,项目名称:ltsmin,代码行数:19,代码来源:cndfs.c


示例14: gcf_extract

static void gcf_extract(){
    char *gcf_name=HREnextArg();
    if (gcf_name==NULL) {
        Abort("missing <gcf archive> argument");
    }
    archive_t arch=arch_gcf_read(raf_unistd(gcf_name));
    archive_t dir;
    if (outputdir) {
        dir=arch_dir_create(outputdir,blocksize,force?DELETE_ALL:DELETE_NONE);
    } else {
        dir=arch_dir_open(".",blocksize);
    }
    char*pattern=HREnextArg();
    do {
        archive_copy(arch,dir,NULL,blocksize,pattern);
    } while((pattern=HREnextArg()));
    arch_close(&dir);
    arch_close(&arch);
}
开发者ID:Meijuh,项目名称:ltsmin,代码行数:19,代码来源:gcf-tool.c


示例15: balloc

/* external function definitions */
void *
balloc(int size)
{
  static char fnc[] = "balloc";
  void *p;

  if (size <= 0) {
    return (void *) (0);
  }
  if ((p = (void *) malloc((unsigned) size)) == (void *) (0)) {
    if (errno == ENOMEM) {
      /* GASP!!!! */
      gasp(size);
      _exit(1);
    }
    Abort("%t %s(): abort: malloc(%u): %m\n", fnc, (unsigned) size);
  }
  return p;
}
开发者ID:PlanetAPL,项目名称:a-plus,代码行数:20,代码来源:balloc.c


示例16: Abort

void
SpeechRecognition::ProcessTestEventRequest(nsISupports* aSubject, const nsAString& aEventName)
{
  if (aEventName.EqualsLiteral("EVENT_ABORT")) {
    Abort();
  } else if (aEventName.EqualsLiteral("EVENT_AUDIO_ERROR")) {
    DispatchError(SpeechRecognition::EVENT_AUDIO_ERROR,
                  SpeechRecognitionErrorCode::Audio_capture, // TODO different codes?
                  NS_LITERAL_STRING("AUDIO_ERROR test event"));
  } else {
    NS_ASSERTION(mTestConfig.mFakeRecognitionService,
                 "Got request for fake recognition service event, but "
                 TEST_PREFERENCE_FAKE_RECOGNITION_SERVICE " is unset");

    // let the fake recognition service handle the request
  }

  return;
}
开发者ID:JasonJinCn,项目名称:gecko-dev,代码行数:19,代码来源:SpeechRecognition.cpp


示例17: FindContext

int 
FindContext(double M[2][2])  /* array to search for                          */
{
       register int i;       /* loop variable for search                     */
       for (i=0; i < nextcontext; i++)
               if (M[0][0] == contexts[i].normal[0][0] && M[1][0] == contexts[i].normal[1][0]
                   && M[0][1] == contexts[i].normal[0][1] && M[1][1] == contexts[i].normal[1][1])
                       break;
 
       if (i >= nextcontext) {
               if (i >= MAXCONTEXTS)
                       Abort("Context:  out of them");
               LONGCOPY(contexts[i].normal, M, sizeof(contexts[i].normal));
               MatrixInvert(M, contexts[i].inverse);
               nextcontext++;
       }
 
       return(i);
}
开发者ID:BackupTheBerlios,项目名称:dri-ex-svn,代码行数:19,代码来源:spaces.c


示例18: ApiChooseConfig

void ApiChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config, EGLBoolean ret)
{
    stEglDisplay    *display    = _GetDisplay(dpy);
    const EGLint    *value      = attrib_list;
    stEglConfig     *p          = NULL;
    EGLBoolean      bFinish     = EGL_FALSE;
    EGLint          num         = num_config ? *num_config : 0;

    if (configs == NULL)
    {
        return;
    }

    for (GLint i=0; i<num; i++)
    {
        p = new stEglConfig();

        if (p)
        {
            p->config = configs[i];
            _ParseAttrbutes(dpy, value, p);
        }
        else
        {
            Abort("%s(%d)\n", __FUNCTION__, __LINE__);
            return;
        }

        if (display->eglConfStack)
        {
            stEglConfig *pTmp = display->eglConfStack;
            display->eglConfStack = p;
            p->next = pTmp;
        }
        else
        {
            display->eglConfStack = p;
        }
    }

    CTX_ANALYZER_FUNC6(ChooseConfig, EGLOutput, EGL_OUT_BUF_SIZE, dpy, attrib_list, configs, config_size, num_config, ret);
}
开发者ID:hyyh619,项目名称:GLESAPIAnalyzer,代码行数:42,代码来源:ApiEGLContext.cpp


示例19: rationalize32

void
rationalize32 (float f,uint32_t *numerator,uint32_t *denominator)
{
    uint32_t i,j;
    // try x for 32 bit x
    j=1;
    i=nearbyintf(((float)j)*f);
    if (i==0){
        i=nearbyintf(1000000000*f);
        if (i==0){
            *numerator=0;
            *denominator=1;
            return;           
        }
    } else if (fequal(f,(float)i)){
        *numerator=i;
        *denominator=1;
        return;
    }
    // try x/y for 8 bit x,y
    for(j=2;j<256;j++){
        i=nearbyintf(((float)j)*f);
        if (i<=0 || i>=256) continue;
        if (fequal(f,((float)i)/((float)j))){
            *numerator=i;
            *denominator=j;
            return;
        }
    }
    // try 3(4??) digit decimal.
    for(j=1000;j<1000000000;j=j*10){
        i=nearbyintf(((float)j)*f);
        if (i<=100 || i>10000) continue;
        if (fequal(f,((float)i)/((float)j))){
            uint32_t c=gcd32(i,j);
            *numerator=i/c;
            *denominator=j/c;
            return;
        }
    }
    Abort("Attempt to reverse engineer %f failed",f);
}
开发者ID:Meijuh,项目名称:ltsmin,代码行数:42,代码来源:rationals.c


示例20: gzip_read_max

static size_t gzip_read_max(stream_t stream,void*buf,size_t count){
    stream->rd.next_out=buf;
    stream->rd.avail_out=count;
    int res;
    do {
        if (stream->rd.avail_in==0){
            stream->rd.next_in=stream->rd_buf;
            stream->rd.avail_in=stream_read_max(stream->s,stream->rd_buf,stream->bufsize);
        }
        if (stream->compress){
            res=inflate(&stream->rd, Z_NO_FLUSH);
        } else {
            res=deflate(&stream->rd, Z_NO_FLUSH);
        }
        if(res!=Z_OK && res!=Z_STREAM_END){
            Abort("compression error %d %s",res,zError(res));
        }
    } while(stream->rd.avail_out && res!=Z_STREAM_END);
    return (count-stream->rd.avail_out);
}
开发者ID:Meijuh,项目名称:ltsmin,代码行数:20,代码来源:hre_gzstream.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ Abs函数代码示例发布时间:2022-05-30
下一篇:
C++ A_STAR_STAR函数代码示例发布时间: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