本文整理汇总了C++中Abort函数的典型用法代码示例。如果您正苦于以下问题:C++ Abort函数的具体用法?C++ Abort怎么用?C++ Abort使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Abort函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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();
}
}
示例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;
}
示例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);
}
示例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;
}
}
示例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);
}
}
示例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();
}
}
示例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!");
}
}
示例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
}
}
示例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();
}
}
示例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);
}
}
示例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();
}
}
示例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.");
}
}
示例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);
}
示例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;
}