当前位置: 首页>>代码示例>>C++>>正文


C++ DebugCheck函数代码示例

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


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

示例1: StoreWillBuy

/* determines if the store will buy a specific type of object */
E_Boolean StoreWillBuy (E_equipObjectTypes type)
{
    E_Boolean willbuy=FALSE;
    DebugRoutine ("StoreWillBuy");
    DebugCheck (type<EQUIP_OBJECT_TYPE_UNKNOWN);

    willbuy=G_storeWillBuy[type];

    DebugEnd();
    return (willbuy);
}
开发者ID:ExiguusEntertainment,项目名称:AmuletsArmor,代码行数:12,代码来源:STORE.C

示例2: FormAddTextButton

T_formObjectID FormAddTextButton(
        T_word16 x1,
        T_word16 y1,
        T_byte8 *data,
        T_byte8 *picturename,
        T_byte8 *fontname,
        T_byte8 fcolor,
        T_byte8 bcolor,
        E_Boolean toggletype,
        T_word16 hotkey,
        T_word32 idnum)
{
    T_word16 i;
    T_buttonID buttonID;

    DebugRoutine("FormAddTextButton");
    DebugCheck(picturename!=NULL);

    G_formHasButtons = TRUE;
    for (i = 0; i < MAX_FORM_OBJECTS; i++) {
        /* find an empty slot */
        if (G_formObjectArray[i] == NULL ) {
            /* found one, create a new button */
            buttonID = ButtonCreate(x1, y1, picturename, toggletype, hotkey,
                    NULL, NULL );
            ButtonSetFont(buttonID, fontname);
            ButtonSetText(buttonID, data, fcolor);
            /* now that a button has been created, make an objstruct for it */
            G_formObjectArray[i] = FormCreateObject(FORM_OBJECT_BUTTON,
                    (T_formObjectID)buttonID, idnum);
            /* we made a new object struct, break from the loop */
            break;
        }
    }

    /* make sure we haven't exceeded any limits */
    DebugCheck(i!=MAX_FORM_OBJECTS);
    DebugEnd();
    /* return the ID for the object created */
    return (G_formObjectArray[i]);
}
开发者ID:LesInk,项目名称:Test,代码行数:41,代码来源:FORM.C

示例3: DebugRoutine

T_void *FileLoad(T_byte8 *p_filename, T_word32 *p_size)
{
    T_byte8 *p_data ;
    T_file file ;

    DebugRoutine("FileLoad") ;
    DebugCheck(p_filename != NULL) ;
    DebugCheck(p_size != NULL) ;

    /* See how big the file is so we know how much memory to allocate. */
    *p_size = FileGetSize(p_filename) ;
#ifdef COMPILE_OPTION_FILE_OUTPUT
printf("!A 1 file_%s\n", p_filename) ;
printf("!A 1 file_r_%s\n", DebugGetCallerName()) ;
#endif
    if (*p_size)  {
        /* Allocate the memory for the file. */
        p_data = MemAlloc(*p_size) ;

        DebugCheck(p_data != NULL) ;

        /* Make sure we got the memory. */
        if (p_data != NULL)  {
            /* If memory was allocated, read in the file into this memory. */
            file = FileOpen(p_filename, FILE_MODE_READ) ;
            FileRead(file, p_data, *p_size) ;
            FileClose(file) ;
        } else {
            /* If memory was not allocated, return with a zero length. */
            *p_size = 0 ;
        }
    } else {
        *p_size = 0 ;
        p_data = NULL ;
    }

    DebugEnd() ;

    /* Return the pointer to the data. */
    return p_data ;
}
开发者ID:LesInk,项目名称:Test,代码行数:41,代码来源:FILE.C

示例4: FileClose

T_void FileClose(T_file file)
{
    DebugRoutine("FileClose") ;
    DebugCheck(file != FILE_BAD) ;

    close(file) ;

    /* Decrement the number of open files. */
    G_numberOpenFiles-- ;

    DebugEnd();
}
开发者ID:LesInk,项目名称:Test,代码行数:12,代码来源:FILE.C

示例5: SliderGetValue

T_word16 SliderGetValue (T_sliderID sliderID)
{
   T_sliderStruct *p_slider;

   DebugRoutine ("SliderSetValue");
   DebugCheck (sliderID != NULL);

   p_slider=(T_sliderStruct *)sliderID;
   DebugEnd();

   return (p_slider->curval);
}
开发者ID:LesInk,项目名称:Test,代码行数:12,代码来源:SLIDR.C

示例6: SliderSetCallBack

T_void SliderSetCallBack (T_sliderID sliderID, T_sliderHandler sliderhandler)
{
	T_sliderStruct *p_slider;

	DebugRoutine ("SliderSetCallBack");
	DebugCheck (sliderID != NULL);

	p_slider = (T_sliderStruct *)sliderID;
	p_slider->callback=sliderhandler;

	DebugEnd();
}
开发者ID:LesInk,项目名称:Test,代码行数:12,代码来源:SLIDR.C

示例7: DoubleLinkListGetLast

/**
 *  DoubleLinkListGetLast  returns the last  element in a
 *  double link list.
 *
 *  @param linkList -- List to get last element
 *
 *  @return Last  element, or
 *      DOUBLE_LINK_LIST_ELEMENT_BAD if none.
 *
 *<!-----------------------------------------------------------------------*/
T_doubleLinkListElement DoubleLinkListGetLast(T_doubleLinkList linkList)
{
    T_doubleLinkListStruct *p_head ;
    T_doubleLinkListElement last = DOUBLE_LINK_LIST_ELEMENT_BAD ;

    DebugRoutine("DoubleLinkListGetLast") ;
    DebugCheck(linkList != DOUBLE_LINK_LIST_BAD) ;

    /* Get a quick pointer. */
    p_head = (T_doubleLinkListStruct *)linkList ;
    DebugCheck(p_head->tag == DOUBLE_LINK_LIST_TAG) ;

    if (p_head)  {
        if (p_head->p_previous != p_head)
            last = (T_doubleLinkListElement)p_head->p_previous ;
    }

    DebugEnd() ;

    return last ;
}
开发者ID:cabbruzzese,项目名称:AmuletsArmor,代码行数:31,代码来源:DBLLINK.C

示例8: GetLength64

BOOL GetLength64(CString filename, _int64 &size)
{
  WIN32_FIND_DATA findFileData;
  HANDLE hFind = FindFirstFile(filename, &findFileData);
  if (hFind == INVALID_HANDLE_VALUE)
    return FALSE;
  DebugCheck(FindClose(hFind));

  size=((_int64)findFileData.nFileSizeHigh<<32)+findFileData.nFileSizeLow;

  return TRUE;
}
开发者ID:gvsurenderreddy,项目名称:Far-NetBox,代码行数:12,代码来源:MFC64bitFix.cpp

示例9: ICmdQClearPort

/**
 *  ICmdQClearPort removes all outgoing packets for the current port
 *  and all incoming packets, too.  ACK packets are left alone.
 *
 *  NOTE: 
 *  Make sure that this routine is only called when all communications
 *  are finalized.
 *
 *<!-----------------------------------------------------------------------*/
static T_void ICmdQClearPort(T_void)
{
    T_word16 i ;
    T_cmdQStruct *p_cmdQ ;
    T_cmdQPacketStruct *p_packet ;
    T_packetLong packet ;

    DebugRoutine("ICmdQClearPort") ;

    /* First, read in all the incoming packets (and ignore them). */
    while (PacketGet(&packet) == 0)
        { }

    /* Catch all the outgoing packets. */
    /* Go through all the queues looking for packets to remove. */
    for (i=1; i<PACKET_COMMAND_MAX; i++)  {
        for (;;)  {
            p_cmdQ = &G_activeCmdQList[i] ;
            p_packet = p_cmdQ->last ;
            if (p_packet != NULL)  {
#ifndef NDEBUG
                /* Check for the tag. */
                if (strcmp(p_packet->tag, "CmQ") != 0)  {
                    printf("Bad packet %p\n", p_packet) ;
                    DebugCheck(FALSE) ;
                }
#endif
                /* Found a packet, remove it. */
                p_cmdQ->last = p_packet->prev ;
                if (p_cmdQ->last == NULL)
                    p_cmdQ->first = NULL ;
                else {
                    p_cmdQ->last->next = NULL ;
                }

#ifndef NDEBUG
                /* Mark the packet as gone. */
                strcpy(p_packet->tag, "c_q") ;
                G_packetsFree++ ;
#endif

                /* Delete it. */
                MemFree(p_packet) ;
            } else {
                /* No packet.  Stop looping on this queue. */
                break ;
            }
        }
    }

    DebugEnd() ;
}
开发者ID:ExiguusEntertainment,项目名称:AmuletsArmor,代码行数:61,代码来源:CMDQUEUE.C

示例10: DebugRoutine

/**
 *  DoubleLinkListElementGetData pulls out the data pointer from a
 *  double link list element.
 *
 *  @param element -- Element to get data out of
 *
 *  @return Found data pointer on element
 *
 *<!-----------------------------------------------------------------------*/
T_void *DoubleLinkListElementGetData(T_doubleLinkListElement element)
{
    T_void *p_data ;
    T_doubleLinkListStruct *p_node ;

    DebugRoutine("DoubleLinkListElementGetData") ;
    DebugCheck(element != DOUBLE_LINK_LIST_ELEMENT_BAD) ;

    /* Get a quick pointer. */
    p_node = (T_doubleLinkListStruct *)element;
    DebugCheck(p_node->tag != DOUBLE_LINK_LIST_DEAD_TAG);
    DebugCheck(p_node->tag == DOUBLE_LINK_LIST_TAG) ;

    /* Make sure we are not trying to get data from the head. */
    DebugCheck(p_node->p_head != p_node) ;

    p_data = p_node->countOrData.p_data ;

    DebugEnd() ;

    return p_data ;
}
开发者ID:cabbruzzese,项目名称:AmuletsArmor,代码行数:31,代码来源:DBLLINK.C

示例11: SMCLogoffCheckFlag

E_Boolean SMCLogoffCheckFlag(
              T_stateMachineHandle handle,
              T_word32 flag)
{
    E_Boolean stateFlag = FALSE ;        /* Return status will default */
                                         /* to FALSE. */
    T_SMCLogoffData *p_data ;

    DebugRoutine("SMCLogoffCheckFlag") ;
    DebugCheck(G_smHandle != STATE_MACHINE_HANDLE_BAD) ;

    p_data = (T_SMCLogoffData *)StateMachineGetExtraData(G_smHandle) ;
    DebugCheck(p_data != NULL) ;

    /* If a valid flag, get the state */
    DebugCheck(flag < SMCLOGOFF_FLAG_UNKNOWN) ;
    if (flag < SMCLOGOFF_FLAG_UNKNOWN)
        stateFlag = p_data->stateFlags[flag] ;

    DebugEnd() ;
    return stateFlag ;
}
开发者ID:LesInk,项目名称:Test,代码行数:22,代码来源:SMCLOGOF.C

示例12: DoubleLinkListAddElementAtFront

/**
 *  DoubleLinkListAddElementAtFront adds a new element at the front of
 *  the link list.
 *
 *  @param linkList -- Handle to link list to insert item
 *  @param p_data -- Pointer to element data
 *
 *<!-----------------------------------------------------------------------*/
T_doubleLinkListElement DoubleLinkListAddElementAtFront(
                            T_doubleLinkList linkList,
                            T_void *p_data)
{
    T_doubleLinkListStruct *p_head ;
    T_doubleLinkListStruct *p_element ;

    DebugRoutine("DoubleLinkListAddElementAtFront") ;
    DebugCheck(linkList != DOUBLE_LINK_LIST_BAD) ;

    /* Get a quick pointer. */
    p_head = (T_doubleLinkListStruct *)linkList ;
    DebugCheck(p_head->tag == DOUBLE_LINK_LIST_TAG) ;
    DebugCheck(p_head->p_head == p_head) ;

    if (p_head)  {
        /* Create a new element. */
#ifdef COMPILE_OPTION_DOUBLE_LINK_OUTPUT
printf("!A 1 node_%s\n", DebugGetCallerName()) ;
#endif
        p_element = ICreateNode() ;
        DebugCheck(p_element != NULL) ;

        if (p_element)  {
            /* Attach the data to the element. */
            p_element->countOrData.p_data = p_data ;
            p_element->p_previous = p_head ;
            p_element->p_next = p_head->p_next ;
            p_element->p_head = p_head ;
            p_head->p_next->p_previous = p_element ;
            p_head->p_next = p_element ;
            p_head->countOrData.count++ ;
        }
    }

    DebugEnd() ;

    return ((T_doubleLinkListElement)p_element) ;
}
开发者ID:cabbruzzese,项目名称:AmuletsArmor,代码行数:47,代码来源:DBLLINK.C

示例13: SMCLogoffTimeoutEnter

T_void SMCLogoffTimeoutEnter(
           T_stateMachineHandle handle,
           T_word32 extraData)
{
    T_SMCLogoffData *p_data ;

    DebugRoutine("SMCLogoffTimeoutEnter") ;

    p_data = (T_SMCLogoffData *)StateMachineGetExtraData(G_smHandle) ;
    DebugCheck(p_data != NULL) ;

    DebugEnd() ;
}
开发者ID:LesInk,项目名称:Test,代码行数:13,代码来源:SMCLOGOF.C

示例14: DoneButtons

global void DoneButtons(void)
{
    int z;

    for ( z = 0; z < UnitButtonCount; z++ ) {
	DebugCheck( !UnitButtonTable[z] );
	free( UnitButtonTable[z]->ValueStr );
	free( UnitButtonTable[z]->Hint );
	free( UnitButtonTable[z]->UMask );
	free( UnitButtonTable[z] );
    }
    UnitButtonCount = 0;
};
开发者ID:saniv,项目名称:freecraft-ale-clone,代码行数:13,代码来源:botpanel.c

示例15: PeopleHereInitialize

/**
 *  This routine starts up the people here module.
 *
 *<!-----------------------------------------------------------------------*/
T_void PeopleHereInitialize(T_void)
{
    DebugRoutine("PeopleHereInitialize");
    DebugCheck(G_init == FALSE);

    G_init = TRUE;

    /* Clear list of playerIDSelf structures. */
    memset(G_peopleList, 0, sizeof(G_peopleList));
    G_ourState = PLAYER_ID_STATE_NONE;

    DebugEnd();
}
开发者ID:ExiguusEntertainment,项目名称:AmuletsArmor,代码行数:17,代码来源:PEOPHERE.C


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