本文整理汇总了C++中FAILURE函数的典型用法代码示例。如果您正苦于以下问题:C++ FAILURE函数的具体用法?C++ FAILURE怎么用?C++ FAILURE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FAILURE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: smggetstr
/***
* smggetstr - Get an SMG string capability by name
*
* smggetstr attempts to obtain the escape sequence for a particular
* job from the SMG library. Most sequences do not require a parameter
* with the sequence, others do. In order to obtain the definition
* without knowing ahead of time whether ornot the definition has a
* parameter, we call SMG once with a parameter and if that fails, we
* try again without one. If both attempts fail, we will return the
* NULL string.
*
* Storage for the sequence comes from a local pool.
*
* Returns: Escape sequence
* NULL No escape sequence available
***/
char * smggetstr(int code) /* Request code */
{
char * result;
int rlen, status;
static char seq[1024];
static char * buffer = seq;
static int len = sizeof(seq);
static int arg[2] = { 1, 1 };
/* Get sequence with one parameter */
status = SMG$GET_TERM_DATA(&termtype, &code, &len, &rlen, buffer, arg);
if (FAILURE(status)) {
/* Try again with zero parameters */
status = SMG$GET_TERM_DATA(&termtype, &code, &len, &rlen, buffer);
if (FAILURE(status))
return NULL;
}
/* Check for empty result */
if (rlen == 0)
return NULL;
/* Save current position so we can return it to caller */
result = buffer;
buffer[rlen++] = '\0';
buffer += rlen;
/* Return capability to user */
return result;
}
开发者ID:unusual-thoughts,项目名称:freebsd-1.x-ports,代码行数:47,代码来源:smg.c
示例2: blobdata_file_length
static sw_blob_result blobdata_file_length(const OBJECT *file,
blobdata_private_t *data,
Hq32x2 *length)
{
HQASSERT(file, "No file object") ;
HQASSERT(oType(*file) == OFILE || oType(*file) == OSTRING,
"Blob data source is not a file or a filename") ;
HQASSERT(length != NULL, "No where to put length") ;
VERIFY_OBJECT(data, BLOBDATA_PRIVATE_NAME) ;
/* If we marked the file for lazy opening, then open it now. */
if ( !data->isopen && !blobdata_file_lazy(file, data) )
return FAILURE(SW_BLOB_ERROR_EXPIRED) ;
/* If the length stored is valid, return it. */
if ( !data->length_ok ) {
if ( data->fhandle >= 0 ) {
/* Getting the length of a device file is a *very* expensive
operation. */
if ( !(*theIBytesFile(data->dev))(data->dev, data->fhandle,
&data->length, SW_BYTES_TOTAL_ABS) ) {
(void)device_error_handler(data->dev);
return FAILURE(SW_BLOB_ERROR_EOF) ;
}
if ( data->encrypted ) {
/* Reduce length by size of initialisation and tail data */
Hq32x2SubtractInt32(&data->length, &data->length,
data->hqxoffset + data->hqxtail) ;
HQASSERT(Hq32x2Sign(&data->length) >= 0,
"HQX leader/trailer exceed length of file") ;
}
} else {
/* File/filter bytes available is likely to fail. */
Hq32x2 start = HQ32X2_INIT_ZERO ;
FILELIST *flptr ;
HQASSERT(oType(*file) == OFILE, "Blob data source is not a file") ;
flptr = oFile(*file) ;
HQASSERT(isIOpenFile(flptr), "Blob data file is not open") ;
/* There isn't a good way of getting a file's length. Reset the file
position to the start, because RSDs give the bytes available from
the (unspecified) current position. Ignore it if this fails, in the
vain hope that other bytes available will do something useful. */
(void)(*theIMySetFilePos(flptr))(flptr, &start) ;
if ( (*theIMyBytesAvailable(flptr))(flptr, &data->length) == EOF )
return FAILURE(SW_BLOB_ERROR_EOF) ;
HQASSERT(!data->encrypted, "FILELIST should not be hqx encrypted") ;
}
}
data->length_ok = TRUE ;
*length = data->length ;
return SW_BLOB_OK ;
}
开发者ID:S0043640wipro,项目名称:RiCRiPInt,代码行数:60,代码来源:bdfile.c
示例3: cmapdict
/* ----------------------------------------------------------------------------
function: cmap_getfontmatrix author: Eric Penfold
creation date: 13-Aug-1997 last modification: ##-###-####
arguments:
cmapdict (Input)
fontid (Input)
matrix (Output)
description:
Obtains the font matrix from the CMap to use with the specified
descendant font.
If no matrices are defined at all, or no matrix is defined for this
fontid, then 'matrix' will be set to a null object.
Returns FALSE if the object in the matrix array is not a valid matrix,
or if the fontid is invalid (i.e. the matrix array has fewer entries);
TRUE is otherwise returned.
---------------------------------------------------------------------------- */
Bool cmap_getfontmatrix(OBJECT *cmapdict, int32 fontid, OBJECT *matrix)
{
OBJECT *cmap, *matblk;
OMATRIX omat;
/* Extract CMap */
if ( oType(*cmapdict) != ODICTIONARY )
return FAILURE(FALSE); /* Error - Invalid dictionary */
cmap = fast_extract_hash_name(cmapdict, NAME_CodeMap);
/* Extract matrix block */
if ( oType(*cmap) != ODICTIONARY )
return FAILURE(FALSE); /* Error - Invalid dictionary */
matblk = fast_extract_hash_name(cmap, NAME_usematrixblock);
if ( !matblk ) {
object_store_null(matrix); /* No usematrix defined, use defaults */
} else if ( oType(*matblk) != OARRAY ||
theLen(*matblk) <= fontid ||
!is_matrix(oArray(*matblk) + fontid, &omat) ) {
return FAILURE(FALSE); /* usematrix definition is not valid (for this fontid) */
} else
Copy(matrix, oArray(*matblk) + fontid);
return TRUE;
}
开发者ID:S0043640wipro,项目名称:RiCRiPInt,代码行数:47,代码来源:cmap.c
示例4: BGl__foreignzd2eqzf3z21zz__foreignz00
/* _foreign-eq? */
obj_t BGl__foreignzd2eqzf3z21zz__foreignz00(obj_t BgL_envz00_660, obj_t BgL_o1z00_661, obj_t BgL_o2z00_662)
{ AN_OBJECT;
{ /* Llib/foreign.scm 95 */
{ /* Llib/foreign.scm 96 */
bool_t BgL_auxz00_712;
{ /* Llib/foreign.scm 96 */
obj_t BgL_auxz00_720;obj_t BgL_auxz00_713;
if(
FOREIGNP(BgL_o2z00_662))
{ /* Llib/foreign.scm 96 */
BgL_auxz00_720 = BgL_o2z00_662
; } else
{
obj_t BgL_auxz00_723;
BgL_auxz00_723 =
BGl_typezd2errorzd2zz__errorz00(BGl_string1394z00zz__foreignz00,
BINT(((long)4136)), BGl_string1395z00zz__foreignz00, BGl_string1396z00zz__foreignz00, BgL_o2z00_662);
FAILURE(BgL_auxz00_723,BFALSE,BFALSE);}
if(
FOREIGNP(BgL_o1z00_661))
{ /* Llib/foreign.scm 96 */
BgL_auxz00_713 = BgL_o1z00_661
; } else
{
obj_t BgL_auxz00_716;
BgL_auxz00_716 =
BGl_typezd2errorzd2zz__errorz00(BGl_string1394z00zz__foreignz00,
BINT(((long)4133)), BGl_string1395z00zz__foreignz00, BGl_string1396z00zz__foreignz00, BgL_o1z00_661);
FAILURE(BgL_auxz00_716,BFALSE,BFALSE);}
BgL_auxz00_712 =
FOREIGN_EQP(BgL_auxz00_713, BgL_auxz00_720); }
return
BBOOL(BgL_auxz00_712);} }
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:35,代码来源:foreign.c
示例5: TSTaskList_Append
static BOOL
TSTaskList_Append( TSTaskList* self,
HWND hwnd, ULONG_PTR extra[], int extra_count )
{
TSTaskInfo* ti;
TSTaskInfo** tmp;
ti = TSTaskInfo_New(hwnd, extra, extra_count);
if (ti == NULL) {
FAILURE(T("TSTaskList_Append/TSTaskInfo_New"));
return FALSE;
}
tmp = realloc(self->list, sizeof(self->list[0]) * (self->count + 1));
if (tmp == NULL) {
TSTaskInfo_Del(ti);
FAILURE(T("TSTaskList_Append/realloc"));
return FALSE;
}
self->list = tmp;
self->list[self->count] = ti;
self->count++;
return TRUE;
}
开发者ID:ejasiunas,项目名称:bbclean-xzero450,代码行数:26,代码来源:ts.c
示例6: load_vmstate
static int load_vmstate(const VMStateDescription *desc,
void *obj, void *obj_clone,
void (*obj_copy)(void *, void*),
int version, uint8_t *wire, size_t size)
{
/* We test with zero size */
obj_copy(obj_clone, obj);
FAILURE(load_vmstate_one(desc, obj, version, wire, 0));
/* Stream ends with QEMU_EOF, so we need at least 3 bytes to be
* able to test in the middle */
if (size > 3) {
/* We test with size - 2. We can't test size - 1 due to EOF tricks */
obj_copy(obj, obj_clone);
FAILURE(load_vmstate_one(desc, obj, version, wire, size - 2));
/* Test with size/2, first half of real state */
obj_copy(obj, obj_clone);
FAILURE(load_vmstate_one(desc, obj, version, wire, size/2));
/* Test with size/2, second half of real state */
obj_copy(obj, obj_clone);
FAILURE(load_vmstate_one(desc, obj, version, wire + (size/2), size/2));
}
obj_copy(obj, obj_clone);
return load_vmstate_one(desc, obj, version, wire, size);
}
开发者ID:Fantu,项目名称:qemu,代码行数:30,代码来源:test-vmstate.c
示例7: BGl_foreignzd2eqzf3z21zz__foreignz00
/* foreign-eq? */
BGL_EXPORTED_DEF bool_t BGl_foreignzd2eqzf3z21zz__foreignz00(obj_t BgL_o1z00_2, obj_t BgL_o2z00_3)
{ AN_OBJECT;
{ /* Llib/foreign.scm 95 */
{ /* Llib/foreign.scm 96 */
obj_t BgL_auxz00_704;obj_t BgL_auxz00_697;
if(
FOREIGNP(BgL_o2z00_3))
{ /* Llib/foreign.scm 96 */
BgL_auxz00_704 = BgL_o2z00_3
; } else
{
obj_t BgL_auxz00_707;
BgL_auxz00_707 =
BGl_typezd2errorzd2zz__errorz00(BGl_string1394z00zz__foreignz00,
BINT(((long)4136)), BGl_string1395z00zz__foreignz00, BGl_string1396z00zz__foreignz00, BgL_o2z00_3);
FAILURE(BgL_auxz00_707,BFALSE,BFALSE);}
if(
FOREIGNP(BgL_o1z00_2))
{ /* Llib/foreign.scm 96 */
BgL_auxz00_697 = BgL_o1z00_2
; } else
{
obj_t BgL_auxz00_700;
BgL_auxz00_700 =
BGl_typezd2errorzd2zz__errorz00(BGl_string1394z00zz__foreignz00,
BINT(((long)4133)), BGl_string1395z00zz__foreignz00, BGl_string1396z00zz__foreignz00, BgL_o1z00_2);
FAILURE(BgL_auxz00_700,BFALSE,BFALSE);}
return
FOREIGN_EQP(BgL_auxz00_697, BgL_auxz00_704);} }
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:31,代码来源:foreign.c
示例8: BGl__listzd2ze3tvectorz31zz__tvectorz00
/* _list->tvector */
obj_t BGl__listzd2ze3tvectorz31zz__tvectorz00(obj_t BgL_envz00_1647,
obj_t BgL_idz00_1648, obj_t BgL_lz00_1649)
{
AN_OBJECT;
{ /* Llib/tvector.scm 163 */
{ /* Llib/tvector.scm 164 */
obj_t BgL_auxz00_1838;
obj_t BgL_auxz00_1831;
{ /* Llib/tvector.scm 164 */
bool_t BgL_testz00_1839;
if (PAIRP(BgL_lz00_1649))
{ /* Llib/tvector.scm 164 */
BgL_testz00_1839 = ((bool_t) 1);
}
else
{ /* Llib/tvector.scm 164 */
BgL_testz00_1839 = NULLP(BgL_lz00_1649);
}
if (BgL_testz00_1839)
{ /* Llib/tvector.scm 164 */
BgL_auxz00_1838 = BgL_lz00_1649;
}
else
{
obj_t BgL_auxz00_1843;
BgL_auxz00_1843 =
BGl_typezd2errorzd2zz__errorz00(BGl_string2198z00zz__tvectorz00,
BINT(((long) 6767)), BGl_string2217z00zz__tvectorz00,
BGl_string2218z00zz__tvectorz00, BgL_lz00_1649);
FAILURE(BgL_auxz00_1843, BFALSE, BFALSE);
}}
if (SYMBOLP(BgL_idz00_1648))
{ /* Llib/tvector.scm 164 */
BgL_auxz00_1831 = BgL_idz00_1648;
}
else
{
obj_t BgL_auxz00_1834;
BgL_auxz00_1834 =
BGl_typezd2errorzd2zz__errorz00(BGl_string2198z00zz__tvectorz00,
BINT(((long) 6767)), BGl_string2217z00zz__tvectorz00,
BGl_string2203z00zz__tvectorz00, BgL_idz00_1648);
FAILURE(BgL_auxz00_1834, BFALSE, BFALSE);
}
return
BGl_listzd2ze3tvectorz31zz__tvectorz00(BgL_auxz00_1831,
BgL_auxz00_1838);
}
}
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:56,代码来源:tvector.c
示例9: BGl__declarezd2tvectorz12zc0zz__tvectorz00
/* _declare-tvector! */
obj_t BGl__declarezd2tvectorz12zc0zz__tvectorz00(obj_t BgL_envz00_1640,
obj_t BgL_idz00_1641, obj_t BgL_allocatez00_1642, obj_t BgL_refz00_1643,
obj_t BgL_setz00_1644)
{
AN_OBJECT;
{ /* Llib/tvector.scm 139 */
{ /* Llib/tvector.scm 140 */
obj_t BgL_auxz00_1782;
char *BgL_auxz00_1773;
if (PROCEDUREP(BgL_allocatez00_1642))
{ /* Llib/tvector.scm 140 */
BgL_auxz00_1782 = BgL_allocatez00_1642;
}
else
{
obj_t BgL_auxz00_1785;
BgL_auxz00_1785 =
BGl_typezd2errorzd2zz__errorz00(BGl_string2198z00zz__tvectorz00,
BINT(((long) 5745)), BGl_string2210z00zz__tvectorz00,
BGl_string2212z00zz__tvectorz00, BgL_allocatez00_1642);
FAILURE(BgL_auxz00_1785, BFALSE, BFALSE);
}
{ /* Llib/tvector.scm 140 */
obj_t BgL_auxz00_1774;
if (STRINGP(BgL_idz00_1641))
{ /* Llib/tvector.scm 140 */
BgL_auxz00_1774 = BgL_idz00_1641;
}
else
{
obj_t BgL_auxz00_1777;
BgL_auxz00_1777 =
BGl_typezd2errorzd2zz__errorz00(BGl_string2198z00zz__tvectorz00,
BINT(((long) 5745)), BGl_string2210z00zz__tvectorz00,
BGl_string2211z00zz__tvectorz00, BgL_idz00_1641);
FAILURE(BgL_auxz00_1777, BFALSE, BFALSE);
}
BgL_auxz00_1773 = BSTRING_TO_STRING(BgL_auxz00_1774);
}
return
BGl_declarezd2tvectorz12zc0zz__tvectorz00(BgL_auxz00_1773,
BgL_auxz00_1782, BgL_refz00_1643, BgL_setz00_1644);
}
}
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:51,代码来源:tvector.c
示例10: BGl__callzd2withzd2valuesz00zz__r5_control_features_6_4z00
/* _call-with-values */
obj_t BGl__callzd2withzd2valuesz00zz__r5_control_features_6_4z00(obj_t
BgL_envz00_913, obj_t BgL_producerz00_914, obj_t BgL_consumerz00_915)
{
AN_OBJECT;
{ /* Ieee/control5.scm 117 */
{ /* Ieee/control5.scm 278 */
obj_t BgL_auxz00_1420;
obj_t BgL_auxz00_1413;
if (PROCEDUREP(BgL_consumerz00_915))
{ /* Ieee/control5.scm 278 */
BgL_auxz00_1420 = BgL_consumerz00_915;
}
else
{
obj_t BgL_auxz00_1423;
BgL_auxz00_1423 =
BGl_typezd2errorzd2zz__errorz00
(BGl_string1520z00zz__r5_control_features_6_4z00,
BINT(((long) 8393)),
BGl_string1525z00zz__r5_control_features_6_4z00,
BGl_string1526z00zz__r5_control_features_6_4z00,
BgL_consumerz00_915);
FAILURE(BgL_auxz00_1423, BFALSE, BFALSE);
}
if (PROCEDUREP(BgL_producerz00_914))
{ /* Ieee/control5.scm 278 */
BgL_auxz00_1413 = BgL_producerz00_914;
}
else
{
obj_t BgL_auxz00_1416;
BgL_auxz00_1416 =
BGl_typezd2errorzd2zz__errorz00
(BGl_string1520z00zz__r5_control_features_6_4z00,
BINT(((long) 8393)),
BGl_string1525z00zz__r5_control_features_6_4z00,
BGl_string1526z00zz__r5_control_features_6_4z00,
BgL_producerz00_914);
FAILURE(BgL_auxz00_1416, BFALSE, BFALSE);
}
return
BGl_callzd2withzd2valuesz00zz__r5_control_features_6_4z00
(BgL_auxz00_1413, BgL_auxz00_1420);
}
}
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:51,代码来源:control5.c
示例11: main
int main(int argc, char *argv[])
{
char stdio[] = "-";
char *defaultfilev[1] = { stdio };
int filec = (argc == 1 ? 1 : argc - 1);
char **filev = (argc == 1 ? defaultfilev : &argv[1]);
LALFrameUFrFile *output;
output = XLALFrameUFrFileOpen(stdio, "w");
if (!output)
FAILURE("could not create output file\n");
while (filec-- > 0) {
char *fname = *filev++;
LALFrameUFrFile *input;
LALFrameUFrTOC *toc;
size_t nframe;
size_t pos;
input = XLALFrameUFrFileOpen(fname, "r");
if (!input)
FAILURE("file %s not found\n", fname);
toc = XLALFrameUFrTOCRead(input);
if (!toc)
FAILURE("no TOC found in file %s\n", fname);
nframe = XLALFrameUFrTOCQueryNFrame(toc);
if ((int)(nframe) <= 0)
FAILURE("no frames found in file %s\n", fname);
/* loop over frames in input file */
for (pos = 0; pos < nframe; ++pos) {
LALFrameUFrameH *frame;
frame = framecpy(input, pos);
copydetectors(frame, input);
copychannels(frame, input, pos, NULL);
XLALFrameUFrameHWrite(output, frame);
XLALFrameUFrameHFree(frame);
}
XLALFrameUFrFileClose(input);
}
XLALFrameUFrFileClose(output);
return 0;
}
开发者ID:GeraintPratten,项目名称:lalsuite,代码行数:49,代码来源:cat.c
示例12: BGl__runzd2processzd2zz__processz00
/* _run-process */
obj_t BGl__runzd2processzd2zz__processz00(obj_t BgL_envz00_1494,
obj_t BgL_commandz00_1495, obj_t BgL_restz00_1496)
{
AN_OBJECT;
{ /* Llib/process.scm 211 */
{ /* Llib/process.scm 212 */
obj_t BgL_auxz00_1756;
if (STRINGP(BgL_commandz00_1495))
{ /* Llib/process.scm 212 */
BgL_auxz00_1756 = BgL_commandz00_1495;
}
else
{
obj_t BgL_auxz00_1759;
BgL_auxz00_1759 =
BGl_typezd2errorzd2zz__errorz00(BGl_string2202z00zz__processz00,
BINT(((long) 9480)), BGl_string2237z00zz__processz00,
BGl_string2238z00zz__processz00, BgL_commandz00_1495);
FAILURE(BgL_auxz00_1759, BFALSE, BFALSE);
}
return
BGl_runzd2processzd2zz__processz00(BgL_auxz00_1756, BgL_restz00_1496);
}
}
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:28,代码来源:process.c
示例13: BGl__closezd2processzd2portsz00zz__processz00
/* _close-process-ports */
obj_t BGl__closezd2processzd2portsz00zz__processz00(obj_t BgL_envz00_1497,
obj_t BgL_procz00_1498)
{
AN_OBJECT;
{ /* Llib/process.scm 272 */
{ /* Llib/process.scm 278 */
obj_t BgL_auxz00_1782;
if (PROCESSP(BgL_procz00_1498))
{ /* Llib/process.scm 278 */
BgL_auxz00_1782 = BgL_procz00_1498;
}
else
{
obj_t BgL_auxz00_1785;
BgL_auxz00_1785 =
BGl_typezd2errorzd2zz__errorz00(BGl_string2202z00zz__processz00,
BINT(((long) 11429)), BGl_string2239z00zz__processz00,
BGl_string2204z00zz__processz00, BgL_procz00_1498);
FAILURE(BgL_auxz00_1785, BFALSE, BFALSE);
}
return BGl_closezd2processzd2portsz00zz__processz00(BgL_auxz00_1782);
}
}
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:27,代码来源:process.c
示例14: BGl__z52setzd2mvalueszd2valz12z40zz__r5_control_features_6_4z00
/* _%set-mvalues-val! */
obj_t BGl__z52setzd2mvalueszd2valz12z40zz__r5_control_features_6_4z00(obj_t
BgL_envz00_908, obj_t BgL_nz00_909, obj_t BgL_oz00_910)
{
AN_OBJECT;
{ /* Ieee/control5.scm 84 */
{ /* Ieee/control5.scm 85 */
int BgL_nz00_928;
{ /* Ieee/control5.scm 85 */
obj_t BgL_auxz00_962;
if (INTEGERP(BgL_nz00_909))
{ /* Ieee/control5.scm 85 */
BgL_auxz00_962 = BgL_nz00_909;
}
else
{
obj_t BgL_auxz00_965;
BgL_auxz00_965 =
BGl_typezd2errorzd2zz__errorz00
(BGl_string1520z00zz__r5_control_features_6_4z00,
BINT(((long) 3343)),
BGl_string1524z00zz__r5_control_features_6_4z00,
BGl_string1522z00zz__r5_control_features_6_4z00, BgL_nz00_909);
FAILURE(BgL_auxz00_965, BFALSE, BFALSE);
}
BgL_nz00_928 = CINT(BgL_auxz00_962);
}
return BGL_MVALUES_VAL_SET(BgL_nz00_928, BgL_oz00_910);
}
}
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:34,代码来源:control5.c
示例15: BGl__z52getzd2mvalueszd2valz52zz__r5_control_features_6_4z00
/* _%get-mvalues-val */
obj_t BGl__z52getzd2mvalueszd2valz52zz__r5_control_features_6_4z00(obj_t
BgL_envz00_906, obj_t BgL_nz00_907)
{
AN_OBJECT;
{ /* Ieee/control5.scm 78 */
{ /* Ieee/control5.scm 79 */
int BgL_nz00_927;
{ /* Ieee/control5.scm 79 */
obj_t BgL_auxz00_952;
if (INTEGERP(BgL_nz00_907))
{ /* Ieee/control5.scm 79 */
BgL_auxz00_952 = BgL_nz00_907;
}
else
{
obj_t BgL_auxz00_955;
BgL_auxz00_955 =
BGl_typezd2errorzd2zz__errorz00
(BGl_string1520z00zz__r5_control_features_6_4z00,
BINT(((long) 3056)),
BGl_string1523z00zz__r5_control_features_6_4z00,
BGl_string1522z00zz__r5_control_features_6_4z00, BgL_nz00_907);
FAILURE(BgL_auxz00_955, BFALSE, BFALSE);
}
BgL_nz00_927 = CINT(BgL_auxz00_952);
}
return BGL_MVALUES_VAL(BgL_nz00_927);
}
}
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:34,代码来源:control5.c
示例16: BGl__processzd2pidzd2zz__processz00
/* _process-pid */
obj_t BGl__processzd2pidzd2zz__processz00(obj_t BgL_envz00_1470,
obj_t BgL_procz00_1471)
{
AN_OBJECT;
{ /* Llib/process.scm 134 */
{ /* Llib/process.scm 135 */
int BgL_auxz00_1568;
{ /* Llib/process.scm 135 */
obj_t BgL_procz00_1532;
if (PROCESSP(BgL_procz00_1471))
{ /* Llib/process.scm 135 */
BgL_procz00_1532 = BgL_procz00_1471;
}
else
{
obj_t BgL_auxz00_1571;
BgL_auxz00_1571 =
BGl_typezd2errorzd2zz__errorz00(BGl_string2202z00zz__processz00,
BINT(((long) 5703)), BGl_string2203z00zz__processz00,
BGl_string2204z00zz__processz00, BgL_procz00_1471);
FAILURE(BgL_auxz00_1571, BFALSE, BFALSE);
}
BgL_auxz00_1568 = PROCESS_PID(BgL_procz00_1532);
}
return BINT(BgL_auxz00_1568);
}
}
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:32,代码来源:process.c
示例17: cos
void Matrix::GetRotation(double& ax, double& ay, double& az) const
{
// return the rotations
if(m_unit) {
ax = ay = az = 0;
return;
}
double a; /* cos(bx) */
double b; /* sin(bx) */
double c; /* cos(by) */
double d; /* sin(by) */
double ee; /* cos(bz) */
double f; /* sin(bz) */
double sx, sy, sz;
GetScale(sx, sy, sz);
if(this->m_mirrored == -1) FAILURE(L"Don't know mirror - use IsMirrored method on object");
if(this->m_mirrored) sx = -sx;
// solve for d and decide case and solve for a, b, c, e and f
d = - e[8] / sz;
if((c = (1 - d) * (1 + d)) > 0.001)
{
// case 1
c = sqrt( c );
a = e[10] / sz / c;
b = e[9] / sz / c;
ee = e[0] / sx / c;
f = e[4] / sy / c;
}
else
{
// case 2
double coef;
double p, q;
d = ( d < 0 ) ? -1 : 1 ;
c = 0 ;
p = d * e[5] / sy - e[2] / sx;
q = d * e[6] / sy + e[1] / sx;
if((coef = sqrt( p * p + q * q )) > 0.001) {
a = q / coef;
b = p / coef;
ee = b;
f = -d * b;
}
else
{
/* dependent pairs */
a = e[5] / sy;
b = -e[6] / sy;
ee = 1 ;
f = 0 ;
}
}
// solve and return ax, ay and az
ax = atan2( b, a );
ay = atan2( d, c );
az = atan2( f, ee );
}
开发者ID:Fat-Zer,项目名称:FreeCAD_sf_master,代码行数:60,代码来源:Matrix.cpp
示例18: FAILURE
/*
* === FUNCTION ======================================================================
* Name: nalloc
* Description: wholesale 512 nodes, then retail it 1 by 1
* don't use directly, so static
* =====================================================================================
*/
static alloc_n *nalloc(void *addr, long nbytes, const char *file, int line)
{
/*-----------------------------------------------------------------------------
* need them be static
*-----------------------------------------------------------------------------*/
static int left;
static alloc_n *node;
/*-----------------------------------------------------------------------------
* namely, no one left. so wholesale again
*-----------------------------------------------------------------------------*/
if (!left) {
left = 512;
if (!(node = (alloc_n *) malloc(left * NODE_SIZE))) {
FAILURE();
}
}
node->free = node->link = NULL; /* default non-free */
node->addr = addr;
node->size = nbytes;
node->file = file;
node->line = line;
left--; /* cut down */
/*-----------------------------------------------------------------------------
* return current one, make the static points to the next
*-----------------------------------------------------------------------------*/
return node++;
}
开发者ID:treblih,项目名称:share,代码行数:37,代码来源:alloc.c
示例19: BGl__stringzd2ptrzd2nullzf3zf3zz__foreignz00
/* _string-ptr-null? */
obj_t BGl__stringzd2ptrzd2nullzf3zf3zz__foreignz00(obj_t BgL_envz00_665, obj_t BgL_objz00_666)
{ AN_OBJECT;
{ /* Llib/foreign.scm 109 */
{ /* Llib/foreign.scm 110 */
bool_t BgL_auxz00_742;
{ /* Llib/foreign.scm 110 */
char * BgL_objz00_685;
{ /* Llib/foreign.scm 110 */
obj_t BgL_auxz00_743;
if(
STRINGP(BgL_objz00_666))
{ /* Llib/foreign.scm 110 */
BgL_auxz00_743 = BgL_objz00_666
; } else
{
obj_t BgL_auxz00_746;
BgL_auxz00_746 =
BGl_typezd2errorzd2zz__errorz00(BGl_string1394z00zz__foreignz00,
BINT(((long)4782)), BGl_string1399z00zz__foreignz00, BGl_string1400z00zz__foreignz00, BgL_objz00_666);
FAILURE(BgL_auxz00_746,BFALSE,BFALSE);}
BgL_objz00_685 =
BSTRING_TO_STRING(BgL_auxz00_743); }
BgL_auxz00_742 =
STRING_PTR_NULL(BgL_objz00_685); }
return
BBOOL(BgL_auxz00_742);} }
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:28,代码来源:foreign.c
示例20: BGl__processzd2alivezf3z21zz__processz00
/* _process-alive? */
obj_t BGl__processzd2alivezf3z21zz__processz00(obj_t BgL_envz00_1478,
obj_t BgL_procz00_1479)
{
AN_OBJECT;
{ /* Llib/process.scm 158 */
{ /* Llib/process.scm 159 */
bool_t BgL_auxz00_1602;
{ /* Llib/process.scm 159 */
obj_t BgL_procz00_1536;
if (PROCESSP(BgL_procz00_1479))
{ /* Llib/process.scm 159 */
BgL_procz00_1536 = BgL_procz00_1479;
}
else
{
obj_t BgL_auxz00_1605;
BgL_auxz00_1605 =
BGl_typezd2errorzd2zz__errorz00(BGl_string2202z00zz__processz00,
BINT(((long) 6878)), BGl_string2208z00zz__processz00,
BGl_string2204z00zz__processz00, BgL_procz00_1479);
FAILURE(BgL_auxz00_1605, BFALSE, BFALSE);
}
BgL_auxz00_1602 = c_process_alivep(BgL_procz00_1536);
}
return BBOOL(BgL_auxz00_1602);
}
}
}
开发者ID:mbrock,项目名称:bigloo-llvm,代码行数:32,代码来源:process.c
注:本文中的FAILURE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论