Added service function. (A service function dumping information for debugging, Added service function for screen drawing ON / OFF control) Specifically, see README. Make the object's destructor called from bios_exit () Add appropriate Destroy function to each object. Delete objects properly We have checked the termination process as a whole, as done. Fix to accept interrupts even during key_wait (). (Previously, only key input was accepted) Some timer interrupts are improved. (UNIXTimer.c) Change the wonx_include directory to wonx. Changed to search the full path to perl automatically and insert it at the beginning of perl script. Makefile review, improvement. Changed ON / OFF of screen drawing to switch according to display level. (See README for details.) Also change to display level lowered by F9 and display level raised by F10. In accordance with that, we have reviewed a part of ON / OFF part of drawing and key input event processing. Fixed to display message when pressing key. Obj ObjListData_GetPrev (ObjListData data) Obj ObjListData_GetNext (ObjListData data) To ObjListData ObjListData_GetPrev (ObjListData data) ObjListData ObjListData_GetNext (ObjListData data) Fixed to. Added install, uninstall target to Makefile. Fixed challsrc.sh. Version 2.2 - from wonx-2.2.tar.gz
77 lines
3.4 KiB
C
77 lines
3.4 KiB
C
/*****************************************************************************/
|
|
/* Obj.h - A library for object list. */
|
|
/* */
|
|
/* Obj.h Copyright (c) 2000 Sakai Hiroaki. */
|
|
/* All Rights Reserved. */
|
|
/*****************************************************************************/
|
|
|
|
#ifndef _SAKAILIB_OBJ_H_INCLUDED_
|
|
#define _SAKAILIB_OBJ_H_INCLUDED_
|
|
|
|
typedef void * Obj;
|
|
typedef struct _ObjListData * ObjListData;
|
|
typedef struct _ObjList * ObjList;
|
|
typedef Obj (*ObjDestructor)(Obj);
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
/*****************************************************************************/
|
|
/* ObjList ·¿¥ª¥Ö¥¸¥§¥¯¥È¤ÎÁàºî */
|
|
/*****************************************************************************/
|
|
|
|
Obj ObjListData_GetObj(ObjListData data);
|
|
ObjListData ObjListData_GetPrev(ObjListData data);
|
|
ObjListData ObjListData_GetNext(ObjListData data);
|
|
int ObjList_GetLength(ObjList list);
|
|
ObjListData ObjList_GetStartEdge(ObjList list);
|
|
ObjListData ObjList_GetEndEdge(ObjList list);
|
|
ObjListData ObjList_GetStart(ObjList list);
|
|
ObjListData ObjList_GetEnd(ObjList list);
|
|
int ObjList_IsEmpty(ObjList list);
|
|
int ObjList_IsStartEdge(ObjList list, ObjListData data);
|
|
int ObjList_IsEndEdge(ObjList list, ObjListData data);
|
|
int ObjList_IsStart(ObjList list, ObjListData data);
|
|
int ObjList_IsEnd(ObjList list, ObjListData data);
|
|
ObjListData ObjList_InsertObjToPrev(ObjList list, ObjListData current,
|
|
Obj obj, Obj (*destructor)());
|
|
ObjListData ObjList_InsertObjToNext(ObjList list, ObjListData current,
|
|
Obj obj, Obj (*destructor)());
|
|
ObjListData ObjList_InsertObjToStart(ObjList list, Obj obj,
|
|
Obj (*destructor)());
|
|
ObjListData ObjList_InsertObjToEnd(ObjList list, Obj obj,
|
|
Obj (*destructor)());
|
|
ObjListData ObjList_DeleteObjToPrev(ObjList list, ObjListData current);
|
|
ObjListData ObjList_DeleteObjToNext(ObjList list, ObjListData current);
|
|
ObjListData ObjList_DeleteObjFromStart(ObjList list);
|
|
ObjListData ObjList_DeleteObjFromEnd(ObjList list);
|
|
ObjListData ObjList_MoveObjToPrev(ObjList list,
|
|
ObjListData current,
|
|
ObjListData to);
|
|
ObjListData ObjList_MoveObjToNext(ObjList list,
|
|
ObjListData current,
|
|
ObjListData to);
|
|
ObjListData ObjList_MoveObjToStart(ObjList list, ObjListData current);
|
|
ObjListData ObjList_MoveObjToEnd(ObjList list, ObjListData current);
|
|
ObjList ObjList_Create(); /* ObjList ·¿¥ª¥Ö¥¸¥§¥¯¥È¤òºîÀ®¤¹¤ë */
|
|
ObjList ObjList_Destroy(ObjList list); /* */
|
|
|
|
/*===========================================================================*/
|
|
/* Ê£¿ô¤Î¥ê¥¹¥È´Ö¤Ç¤ÎÁàºî */
|
|
/*===========================================================================*/
|
|
|
|
ObjListData ObjList_MoveObjToPrevOfOtherList(ObjList list, ObjListData current,
|
|
ObjList to_list, ObjListData to);
|
|
ObjListData ObjList_MoveObjToNextOfOtherList(ObjList list, ObjListData current,
|
|
ObjList to_list, ObjListData to);
|
|
ObjListData ObjList_MoveObjToStartOfOtherList(ObjList list,
|
|
ObjListData current,
|
|
ObjList to_list);
|
|
ObjListData ObjList_MoveObjToEndOfOtherList(ObjList list,
|
|
ObjListData current,
|
|
ObjList to_list);
|
|
ObjList ObjList_Concatenate(ObjList list1, ObjList list2);
|
|
|
|
#endif
|
|
|