OSDN Git Service

(none)
authorryuz <ryuz>
Wed, 20 Feb 2008 16:25:24 +0000 (16:25 +0000)
committerryuz <ryuz>
Wed, 20 Feb 2008 16:25:24 +0000 (16:25 +0000)
58 files changed:
aplfw/build/common/gmake/aplfwdep.inc
aplfw/build/common/gmake/aplfwsrc.inc
aplfw/build/common/nmake/aplfwdep.inc
aplfw/build/common/nmake/aplfwsrc.inc
aplfw/build/common/tmp_mkinc/mk_inc.pl
aplfw/library/algorithm/stringformat/stringformat.h [new file with mode: 0755]
aplfw/library/algorithm/stringformat/stringformat_decimal.c [new file with mode: 0755]
aplfw/library/algorithm/stringformat/stringformat_format.c [new file with mode: 0755]
aplfw/library/algorithm/stringformat/stringformat_formatstring.c [new file with mode: 0755]
aplfw/library/algorithm/stringformat/stringformat_formatstringv.c [new file with mode: 0755]
aplfw/library/algorithm/stringformat/stringformat_formatv.c [new file with mode: 0755]
aplfw/library/algorithm/stringformat/stringformat_hexadecimal.c [new file with mode: 0755]
aplfw/library/algorithm/stringformat/stringformat_local.h [new file with mode: 0755]
aplfw/library/algorithm/stringformat/stringformat_nibble.c [new file with mode: 0755]
aplfw/library/algorithm/stringformat/stringformat_string.c [new file with mode: 0755]
aplfw/system/event/event_clear.c [new file with mode: 0755]
aplfw/system/file/file.h
aplfw/system/file/file_printformat.c [new file with mode: 0755]
aplfw/system/file/file_printformatv.c [new file with mode: 0755]
aplfw/system/file/filefmt.c [deleted file]
aplfw/system/file/stdfile.c [deleted file]
aplfw/system/file/stdfile.h
aplfw/system/file/stdio_printformat.c [new file with mode: 0755]
aplfw/system/process/process_getparam.c [new file with mode: 0755]
aplfw/system/process/process_setparam.c [new file with mode: 0755]
kernel/include/config/cfgerr.h
kernel/include/parser/parserr.h
kernel/source/object/cyc/sta_cyc.c
kernel/source/object/cyc/stp_cyc.c
kernel/source/object/dtq/fsnd_dtq.c
kernel/source/object/dtq/kcre_dtq.c
kernel/source/object/dtq/prcv_dtq.c
kernel/source/object/dtq/rcv_dtq.c
kernel/source/object/dtq/snd_dtq.c
kernel/source/object/dtq/trcv_dtq.c
kernel/source/object/flg/clr_flg.c
kernel/source/object/flg/del_flg.c
kernel/source/object/flg/iset_flg.c
kernel/source/object/flg/pol_flg.c
kernel/source/object/flg/set_flg.c
kernel/source/object/flg/twai_flg.c
kernel/source/object/flg/wai_flg.c
kernel/source/object/mbx/rcv_mbx.c
kernel/source/object/mbx/snd_mbx.c
kernel/source/object/mtx/del_mtx.c
kernel/source/object/sem/del_sem.c
kernel/source/object/sem/isig_sem.c
kernel/source/object/sem/sig_sem.c
kernel/source/object/tsk/can_wup.c
kernel/source/object/tsk/chg_pri.c
kernel/source/object/tsk/del_tsk.c
kernel/source/object/tsk/get_pri.c
kernel/source/object/tsk/iact_tsk.c
kernel/source/object/tsk/ref_tst.c
kernel/source/object/tsk/rel_wai.c
kernel/source/object/tsk/rsm_tsk.c
kernel/source/object/tsk/sus_tsk.c
kernel/source/object/tsk/wup_tsk.c

index f6976c0..148299b 100755 (executable)
@@ -64,6 +64,8 @@ $(OBJS_DIR)/process_getcurrenthandle.$(EXT_OBJ):      $(PROCESS_DIR)/process_getcurre
 $(OBJS_DIR)/process_exit.$(EXT_OBJ):   $(PROCESS_DIR)/process_exit.c   $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/process_waitexit.$(EXT_OBJ):       $(PROCESS_DIR)/process_waitexit.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/process_getexitcode.$(EXT_OBJ):    $(PROCESS_DIR)/process_getexitcode.c    $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/process_getparam.$(EXT_OBJ):       $(PROCESS_DIR)/process_getparam.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/process_setparam.$(EXT_OBJ):       $(PROCESS_DIR)/process_setparam.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/process_setcurrentdir.$(EXT_OBJ):  $(PROCESS_DIR)/process_setcurrentdir.c  $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/process_getcurrentdir.$(EXT_OBJ):  $(PROCESS_DIR)/process_getcurrentdir.c  $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/process_getparentprocess.$(EXT_OBJ):       $(PROCESS_DIR)/process_getparentprocess.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
@@ -82,6 +84,7 @@ $(OBJS_DIR)/process_getstderr.$(EXT_OBJ):     $(PROCESS_DIR)/process_getstderr.c      $(C
 $(OBJS_DIR)/event_create.$(EXT_OBJ):   $(EVENT_DIR)/event_create.c     $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/event_delete.$(EXT_OBJ):   $(EVENT_DIR)/event_delete.c     $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/event_set.$(EXT_OBJ):      $(EVENT_DIR)/event_set.c        $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/event_clear.$(EXT_OBJ):    $(EVENT_DIR)/event_clear.c      $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/event_wait.$(EXT_OBJ):     $(EVENT_DIR)/event_wait.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/console_getch.$(EXT_OBJ):  $(FILE_DIR)/console_getch.c     $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/drvobj_close.$(EXT_OBJ):   $(FILE_DIR)/drvobj_close.c      $(COMMON_HEADERS) $(SYSTEM_HEADERS)
@@ -93,7 +96,6 @@ $(OBJS_DIR)/drvobj_open.$(EXT_OBJ):   $(FILE_DIR)/drvobj_open.c       $(COMMON_HEADERS)
 $(OBJS_DIR)/drvobj_read.$(EXT_OBJ):    $(FILE_DIR)/drvobj_read.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/drvobj_seek.$(EXT_OBJ):    $(FILE_DIR)/drvobj_seek.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/drvobj_write.$(EXT_OBJ):   $(FILE_DIR)/drvobj_write.c      $(COMMON_HEADERS) $(SYSTEM_HEADERS)
-$(OBJS_DIR)/filefmt.$(EXT_OBJ):        $(FILE_DIR)/filefmt.c   $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/fileobj_constructor.$(EXT_OBJ):    $(FILE_DIR)/fileobj_constructor.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/fileobj_create.$(EXT_OBJ): $(FILE_DIR)/fileobj_create.c    $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/fileobj_delete.$(EXT_OBJ): $(FILE_DIR)/fileobj_delete.c    $(COMMON_HEADERS) $(SYSTEM_HEADERS)
@@ -112,7 +114,9 @@ $(OBJS_DIR)/file_read.$(EXT_OBJ):   $(FILE_DIR)/file_read.c $(COMMON_HEADERS) $(SY
 $(OBJS_DIR)/file_readdir.$(EXT_OBJ):   $(FILE_DIR)/file_readdir.c      $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/file_seek.$(EXT_OBJ):      $(FILE_DIR)/file_seek.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/file_write.$(EXT_OBJ):     $(FILE_DIR)/file_write.c        $(COMMON_HEADERS) $(SYSTEM_HEADERS)
-$(OBJS_DIR)/stdfile.$(EXT_OBJ):        $(FILE_DIR)/stdfile.c   $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/file_printformat.$(EXT_OBJ):       $(FILE_DIR)/file_printformat.c  $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/file_printformatv.$(EXT_OBJ):      $(FILE_DIR)/file_printformatv.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)/stdio_printformat.$(EXT_OBJ):      $(FILE_DIR)/stdio_printformat.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/syncdrv_constructor.$(EXT_OBJ):    $(FILE_DIR)/syncdrv_constructor.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/syncdrv_destructor.$(EXT_OBJ):     $(FILE_DIR)/syncdrv_destructor.c        $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)/syncdrv_endprocess.$(EXT_OBJ):     $(FILE_DIR)/syncdrv_endprocess.c        $(COMMON_HEADERS) $(SYSTEM_HEADERS)
@@ -180,6 +184,14 @@ $(OBJS_DIR)/crc16_getdigest.$(EXT_OBJ):    $(CRC16_DIR)/crc16_getdigest.c  $(COMMON_
 $(OBJS_DIR)/crc16_update.$(EXT_OBJ):   $(CRC16_DIR)/crc16_update.c     $(COMMON_HEADERS)
 $(OBJS_DIR)/crc16_reset.$(EXT_OBJ):    $(CRC16_DIR)/crc16_reset.c      $(COMMON_HEADERS)
 $(OBJS_DIR)/crc16_table.$(EXT_OBJ):    $(CRC16_DIR)/crc16_table.c      $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_formatstring.$(EXT_OBJ):      $(STRINGFORMAT_DIR)/stringformat_formatstring.c $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_formatstringv.$(EXT_OBJ):     $(STRINGFORMAT_DIR)/stringformat_formatstringv.c        $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_format.$(EXT_OBJ):    $(STRINGFORMAT_DIR)/stringformat_format.c       $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_formatv.$(EXT_OBJ):   $(STRINGFORMAT_DIR)/stringformat_formatv.c      $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_string.$(EXT_OBJ):    $(STRINGFORMAT_DIR)/stringformat_string.c       $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_decimal.$(EXT_OBJ):   $(STRINGFORMAT_DIR)/stringformat_decimal.c      $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_hexadecimal.$(EXT_OBJ):       $(STRINGFORMAT_DIR)/stringformat_hexadecimal.c  $(COMMON_HEADERS)
+$(OBJS_DIR)/stringformat_nibble.$(EXT_OBJ):    $(STRINGFORMAT_DIR)/stringformat_nibble.c       $(COMMON_HEADERS)
 $(OBJS_DIR)/vt100drv_create.$(EXT_OBJ):        $(VT100_DIR)/vt100drv_create.c  $(COMMON_HEADERS)
 $(OBJS_DIR)/vt100drv_delete.$(EXT_OBJ):        $(VT100_DIR)/vt100drv_delete.c  $(COMMON_HEADERS)
 $(OBJS_DIR)/vt100drv_constructor.$(EXT_OBJ):   $(VT100_DIR)/vt100drv_constructor.c     $(COMMON_HEADERS)
index 8bba7a9..fdb08a7 100755 (executable)
@@ -31,6 +31,7 @@ LINK_STREAMBUF        ?= Yes
 LINK_PACKETBUF        ?= Yes
 LINK_IPCHECKSUM       ?= Yes
 LINK_CRC16            ?= Yes
+LINK_STRINGFORMAT     ?= Yes
 
 # Device Drivers
 LINK_VT100            ?= Yes
@@ -173,6 +174,8 @@ CSRCS += $(PROCESS_DIR)/process_getcurrenthandle.c
 CSRCS += $(PROCESS_DIR)/process_exit.c
 CSRCS += $(PROCESS_DIR)/process_waitexit.c
 CSRCS += $(PROCESS_DIR)/process_getexitcode.c
+CSRCS += $(PROCESS_DIR)/process_getparam.c
+CSRCS += $(PROCESS_DIR)/process_setparam.c
 CSRCS += $(PROCESS_DIR)/process_setcurrentdir.c
 CSRCS += $(PROCESS_DIR)/process_getcurrentdir.c
 CSRCS += $(PROCESS_DIR)/process_getparentprocess.c
@@ -198,6 +201,7 @@ SRC_DIRS += $(EVENT_DIR)
 CSRCS += $(EVENT_DIR)/event_create.c
 CSRCS += $(EVENT_DIR)/event_delete.c
 CSRCS += $(EVENT_DIR)/event_set.c
+CSRCS += $(EVENT_DIR)/event_clear.c
 CSRCS += $(EVENT_DIR)/event_wait.c
 endif
 
@@ -216,7 +220,6 @@ CSRCS += $(FILE_DIR)/drvobj_open.c
 CSRCS += $(FILE_DIR)/drvobj_read.c
 CSRCS += $(FILE_DIR)/drvobj_seek.c
 CSRCS += $(FILE_DIR)/drvobj_write.c
-CSRCS += $(FILE_DIR)/filefmt.c
 CSRCS += $(FILE_DIR)/fileobj_constructor.c
 CSRCS += $(FILE_DIR)/fileobj_create.c
 CSRCS += $(FILE_DIR)/fileobj_delete.c
@@ -235,7 +238,9 @@ CSRCS += $(FILE_DIR)/file_read.c
 CSRCS += $(FILE_DIR)/file_readdir.c
 CSRCS += $(FILE_DIR)/file_seek.c
 CSRCS += $(FILE_DIR)/file_write.c
-CSRCS += $(FILE_DIR)/stdfile.c
+CSRCS += $(FILE_DIR)/file_printformat.c
+CSRCS += $(FILE_DIR)/file_printformatv.c
+CSRCS += $(FILE_DIR)/stdio_printformat.c
 CSRCS += $(FILE_DIR)/syncdrv_constructor.c
 CSRCS += $(FILE_DIR)/syncdrv_destructor.c
 CSRCS += $(FILE_DIR)/syncdrv_endprocess.c
@@ -367,6 +372,21 @@ CSRCS += $(CRC16_DIR)/crc16_table.c
 endif
 
 
+# String Format
+ifeq ($(LINK_STRINGFORMAT),Yes)
+STRINGFORMAT_DIR = $(HOSAPLFW_DIR)/library/algorithm/stringformat
+SRC_DIRS += $(STRINGFORMAT_DIR)
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_formatstring.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_formatstringv.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_format.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_formatv.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_string.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_decimal.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_hexadecimal.c
+CSRCS += $(STRINGFORMAT_DIR)/stringformat_nibble.c
+endif
+
+
 
 # --------------------------------------------------
 #  Device Drivers
index 7bfbe26..eea2f02 100755 (executable)
@@ -220,6 +220,12 @@ $(OBJS_DIR)\process_waitexit.c : $(PROCESS_DIR)\process_waitexit.c
 $(OBJS_DIR)\process_getexitcode.c : $(PROCESS_DIR)\process_getexitcode.c
        $(CMD_CP) $(PROCESS_DIR)\process_getexitcode.c $(OBJS_DIR)\
 
+$(OBJS_DIR)\process_getparam.c : $(PROCESS_DIR)\process_getparam.c
+       $(CMD_CP) $(PROCESS_DIR)\process_getparam.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\process_setparam.c : $(PROCESS_DIR)\process_setparam.c
+       $(CMD_CP) $(PROCESS_DIR)\process_setparam.c $(OBJS_DIR)\
+
 $(OBJS_DIR)\process_setcurrentdir.c : $(PROCESS_DIR)\process_setcurrentdir.c
        $(CMD_CP) $(PROCESS_DIR)\process_setcurrentdir.c $(OBJS_DIR)\
 
@@ -281,6 +287,9 @@ $(OBJS_DIR)\event_delete.c : $(EVENT_DIR)\event_delete.c
 $(OBJS_DIR)\event_set.c : $(EVENT_DIR)\event_set.c
        $(CMD_CP) $(EVENT_DIR)\event_set.c $(OBJS_DIR)\
 
+$(OBJS_DIR)\event_clear.c : $(EVENT_DIR)\event_clear.c
+       $(CMD_CP) $(EVENT_DIR)\event_clear.c $(OBJS_DIR)\
+
 $(OBJS_DIR)\event_wait.c : $(EVENT_DIR)\event_wait.c
        $(CMD_CP) $(EVENT_DIR)\event_wait.c $(OBJS_DIR)\
 
@@ -372,9 +381,6 @@ $(OBJS_DIR)\drvobj_seek.c : $(FILE_DIR)\drvobj_seek.c
 $(OBJS_DIR)\drvobj_write.c : $(FILE_DIR)\drvobj_write.c
        $(CMD_CP) $(FILE_DIR)\drvobj_write.c $(OBJS_DIR)\
 
-$(OBJS_DIR)\filefmt.c : $(FILE_DIR)\filefmt.c
-       $(CMD_CP) $(FILE_DIR)\filefmt.c $(OBJS_DIR)\
-
 $(OBJS_DIR)\fileobj_constructor.c : $(FILE_DIR)\fileobj_constructor.c
        $(CMD_CP) $(FILE_DIR)\fileobj_constructor.c $(OBJS_DIR)\
 
@@ -429,8 +435,14 @@ $(OBJS_DIR)\file_seek.c : $(FILE_DIR)\file_seek.c
 $(OBJS_DIR)\file_write.c : $(FILE_DIR)\file_write.c
        $(CMD_CP) $(FILE_DIR)\file_write.c $(OBJS_DIR)\
 
-$(OBJS_DIR)\stdfile.c : $(FILE_DIR)\stdfile.c
-       $(CMD_CP) $(FILE_DIR)\stdfile.c $(OBJS_DIR)\
+$(OBJS_DIR)\file_printformat.c : $(FILE_DIR)\file_printformat.c
+       $(CMD_CP) $(FILE_DIR)\file_printformat.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\file_printformatv.c : $(FILE_DIR)\file_printformatv.c
+       $(CMD_CP) $(FILE_DIR)\file_printformatv.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stdio_printformat.c : $(FILE_DIR)\stdio_printformat.c
+       $(CMD_CP) $(FILE_DIR)\stdio_printformat.c $(OBJS_DIR)\
 
 $(OBJS_DIR)\syncdrv_constructor.c : $(FILE_DIR)\syncdrv_constructor.c
        $(CMD_CP) $(FILE_DIR)\syncdrv_constructor.c $(OBJS_DIR)\
@@ -681,6 +693,37 @@ $(OBJS_DIR)\crc16_table.c : $(CRC16_DIR)\crc16_table.c
        $(CMD_CP) $(CRC16_DIR)\crc16_table.c $(OBJS_DIR)\
 
 
+$(OBJS_DIR)\stringformat.h : $(STRINGFORMAT_DIR)\stringformat.h
+       $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat.h $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_local.h : $(STRINGFORMAT_DIR)\stringformat_local.h
+       $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_local.h $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_formatstring.c : $(STRINGFORMAT_DIR)\stringformat_formatstring.c
+       $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_formatstring.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_formatstringv.c : $(STRINGFORMAT_DIR)\stringformat_formatstringv.c
+       $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_formatstringv.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_format.c : $(STRINGFORMAT_DIR)\stringformat_format.c
+       $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_format.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_formatv.c : $(STRINGFORMAT_DIR)\stringformat_formatv.c
+       $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_formatv.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_string.c : $(STRINGFORMAT_DIR)\stringformat_string.c
+       $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_string.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_decimal.c : $(STRINGFORMAT_DIR)\stringformat_decimal.c
+       $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_decimal.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_hexadecimal.c : $(STRINGFORMAT_DIR)\stringformat_hexadecimal.c
+       $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_hexadecimal.c $(OBJS_DIR)\
+
+$(OBJS_DIR)\stringformat_nibble.c : $(STRINGFORMAT_DIR)\stringformat_nibble.c
+       $(CMD_CP) $(STRINGFORMAT_DIR)\stringformat_nibble.c $(OBJS_DIR)\
+
+
 $(OBJS_DIR)\vt100drv.h : $(VT100_DIR)\vt100drv.h
        $(CMD_CP) $(VT100_DIR)\vt100drv.h $(OBJS_DIR)\
 
@@ -1555,6 +1598,8 @@ $(OBJS_DIR)\process_getcurrenthandle.$(EXT_OBJ):  $(OBJS_DIR)\process_getcurrenth
 $(OBJS_DIR)\process_exit.$(EXT_OBJ):   $(OBJS_DIR)\process_exit.c      $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\process_waitexit.$(EXT_OBJ):       $(OBJS_DIR)\process_waitexit.c  $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\process_getexitcode.$(EXT_OBJ):    $(OBJS_DIR)\process_getexitcode.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\process_getparam.$(EXT_OBJ):       $(OBJS_DIR)\process_getparam.c  $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\process_setparam.$(EXT_OBJ):       $(OBJS_DIR)\process_setparam.c  $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\process_setcurrentdir.$(EXT_OBJ):  $(OBJS_DIR)\process_setcurrentdir.c     $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\process_getcurrentdir.$(EXT_OBJ):  $(OBJS_DIR)\process_getcurrentdir.c     $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\process_getparentprocess.$(EXT_OBJ):       $(OBJS_DIR)\process_getparentprocess.c  $(COMMON_HEADERS) $(SYSTEM_HEADERS)
@@ -1574,6 +1619,7 @@ $(OBJS_DIR)\process_getstderr.$(EXT_OBJ): $(OBJS_DIR)\process_getstderr.c $(COMM
 $(OBJS_DIR)\event_create.$(EXT_OBJ):   $(OBJS_DIR)\event_create.c      $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\event_delete.$(EXT_OBJ):   $(OBJS_DIR)\event_delete.c      $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\event_set.$(EXT_OBJ):      $(OBJS_DIR)\event_set.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\event_clear.$(EXT_OBJ):    $(OBJS_DIR)\event_clear.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\event_wait.$(EXT_OBJ):     $(OBJS_DIR)\event_wait.c        $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 
 $(OBJS_DIR)\console_getch.$(EXT_OBJ):  $(OBJS_DIR)\console_getch.c     $(COMMON_HEADERS) $(SYSTEM_HEADERS)
@@ -1586,7 +1632,6 @@ $(OBJS_DIR)\drvobj_open.$(EXT_OBJ):       $(OBJS_DIR)\drvobj_open.c       $(COMMON_HEADERS)
 $(OBJS_DIR)\drvobj_read.$(EXT_OBJ):    $(OBJS_DIR)\drvobj_read.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\drvobj_seek.$(EXT_OBJ):    $(OBJS_DIR)\drvobj_seek.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\drvobj_write.$(EXT_OBJ):   $(OBJS_DIR)\drvobj_write.c      $(COMMON_HEADERS) $(SYSTEM_HEADERS)
-$(OBJS_DIR)\filefmt.$(EXT_OBJ):        $(OBJS_DIR)\filefmt.c   $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\fileobj_constructor.$(EXT_OBJ):    $(OBJS_DIR)\fileobj_constructor.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\fileobj_create.$(EXT_OBJ): $(OBJS_DIR)\fileobj_create.c    $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\fileobj_delete.$(EXT_OBJ): $(OBJS_DIR)\fileobj_delete.c    $(COMMON_HEADERS) $(SYSTEM_HEADERS)
@@ -1605,7 +1650,9 @@ $(OBJS_DIR)\file_read.$(EXT_OBJ): $(OBJS_DIR)\file_read.c $(COMMON_HEADERS) $(SY
 $(OBJS_DIR)\file_readdir.$(EXT_OBJ):   $(OBJS_DIR)\file_readdir.c      $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\file_seek.$(EXT_OBJ):      $(OBJS_DIR)\file_seek.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\file_write.$(EXT_OBJ):     $(OBJS_DIR)\file_write.c        $(COMMON_HEADERS) $(SYSTEM_HEADERS)
-$(OBJS_DIR)\stdfile.$(EXT_OBJ):        $(OBJS_DIR)\stdfile.c   $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\file_printformat.$(EXT_OBJ):       $(OBJS_DIR)\file_printformat.c  $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\file_printformatv.$(EXT_OBJ):      $(OBJS_DIR)\file_printformatv.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
+$(OBJS_DIR)\stdio_printformat.$(EXT_OBJ):      $(OBJS_DIR)\stdio_printformat.c $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\syncdrv_constructor.$(EXT_OBJ):    $(OBJS_DIR)\syncdrv_constructor.c       $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\syncdrv_destructor.$(EXT_OBJ):     $(OBJS_DIR)\syncdrv_destructor.c        $(COMMON_HEADERS) $(SYSTEM_HEADERS)
 $(OBJS_DIR)\syncdrv_endprocess.$(EXT_OBJ):     $(OBJS_DIR)\syncdrv_endprocess.c        $(COMMON_HEADERS) $(SYSTEM_HEADERS)
@@ -1682,6 +1729,15 @@ $(OBJS_DIR)\crc16_update.$(EXT_OBJ):     $(OBJS_DIR)\crc16_update.c      $(COMMON_HEADERS
 $(OBJS_DIR)\crc16_reset.$(EXT_OBJ):    $(OBJS_DIR)\crc16_reset.c       $(COMMON_HEADERS)
 $(OBJS_DIR)\crc16_table.$(EXT_OBJ):    $(OBJS_DIR)\crc16_table.c       $(COMMON_HEADERS)
 
+$(OBJS_DIR)\stringformat_formatstring.$(EXT_OBJ):      $(OBJS_DIR)\stringformat_formatstring.c $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_formatstringv.$(EXT_OBJ):     $(OBJS_DIR)\stringformat_formatstringv.c        $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_format.$(EXT_OBJ):    $(OBJS_DIR)\stringformat_format.c       $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_formatv.$(EXT_OBJ):   $(OBJS_DIR)\stringformat_formatv.c      $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_string.$(EXT_OBJ):    $(OBJS_DIR)\stringformat_string.c       $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_decimal.$(EXT_OBJ):   $(OBJS_DIR)\stringformat_decimal.c      $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_hexadecimal.$(EXT_OBJ):       $(OBJS_DIR)\stringformat_hexadecimal.c  $(COMMON_HEADERS)
+$(OBJS_DIR)\stringformat_nibble.$(EXT_OBJ):    $(OBJS_DIR)\stringformat_nibble.c       $(COMMON_HEADERS)
+
 $(OBJS_DIR)\vt100drv_create.$(EXT_OBJ):        $(OBJS_DIR)\vt100drv_create.c   $(COMMON_HEADERS)
 $(OBJS_DIR)\vt100drv_delete.$(EXT_OBJ):        $(OBJS_DIR)\vt100drv_delete.c   $(COMMON_HEADERS)
 $(OBJS_DIR)\vt100drv_constructor.$(EXT_OBJ):   $(OBJS_DIR)\vt100drv_constructor.c      $(COMMON_HEADERS)
index 25797f1..66c4356 100755 (executable)
@@ -63,6 +63,9 @@ LINK_IPCHECKSUM       = Yes
 !ifndef LINK_CRC16
 LINK_CRC16            = Yes
 !endif
+!ifndef LINK_STRINGFORMAT
+LINK_STRINGFORMAT     = Yes
+!endif
 
 # Device Drivers
 !ifndef LINK_VT100
@@ -320,6 +323,10 @@ CSRCS = $(CSRCS) $(PROCESS_DIR)\process_waitexit.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\process_waitexit.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(PROCESS_DIR)\process_getexitcode.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\process_getexitcode.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(PROCESS_DIR)\process_getparam.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\process_getparam.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(PROCESS_DIR)\process_setparam.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\process_setparam.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(PROCESS_DIR)\process_setcurrentdir.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\process_setcurrentdir.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(PROCESS_DIR)\process_getcurrentdir.c
@@ -364,6 +371,8 @@ CSRCS = $(CSRCS) $(EVENT_DIR)\event_delete.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\event_delete.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(EVENT_DIR)\event_set.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\event_set.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(EVENT_DIR)\event_clear.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\event_clear.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(EVENT_DIR)\event_wait.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\event_wait.$(EXT_OBJ)
 !endif
@@ -411,8 +420,6 @@ CSRCS = $(CSRCS) $(FILE_DIR)\drvobj_seek.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\drvobj_seek.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(FILE_DIR)\drvobj_write.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\drvobj_write.$(EXT_OBJ)
-CSRCS = $(CSRCS) $(FILE_DIR)\filefmt.c
-OBJS  = $(OBJS)  $(OBJS_DIR)\filefmt.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(FILE_DIR)\fileobj_constructor.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\fileobj_constructor.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(FILE_DIR)\fileobj_create.c
@@ -449,8 +456,12 @@ CSRCS = $(CSRCS) $(FILE_DIR)\file_seek.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\file_seek.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(FILE_DIR)\file_write.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\file_write.$(EXT_OBJ)
-CSRCS = $(CSRCS) $(FILE_DIR)\stdfile.c
-OBJS  = $(OBJS)  $(OBJS_DIR)\stdfile.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(FILE_DIR)\file_printformat.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\file_printformat.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(FILE_DIR)\file_printformatv.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\file_printformatv.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(FILE_DIR)\stdio_printformat.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\stdio_printformat.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(FILE_DIR)\syncdrv_constructor.c
 OBJS  = $(OBJS)  $(OBJS_DIR)\syncdrv_constructor.$(EXT_OBJ)
 CSRCS = $(CSRCS) $(FILE_DIR)\syncdrv_destructor.c
@@ -654,6 +665,30 @@ OBJS  = $(OBJS)  $(OBJS_DIR)\crc16_table.$(EXT_OBJ)
 !endif
 
 
+# String Format
+!if "$(LINK_STRINGFORMAT)" == "Yes"
+STRINGFORMAT_DIR = $(HOSAPLFW_DIR)\library\algorithm\stringformat
+HEADERS = $(HEADERS) $(OBJS_DIR)\stringformat.h
+HEADERS = $(HEADERS) $(OBJS_DIR)\stringformat_local.h
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_formatstring.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\stringformat_formatstring.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_formatstringv.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\stringformat_formatstringv.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_format.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\stringformat_format.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_formatv.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\stringformat_formatv.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_string.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\stringformat_string.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_decimal.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\stringformat_decimal.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_hexadecimal.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\stringformat_hexadecimal.$(EXT_OBJ)
+CSRCS = $(CSRCS) $(STRINGFORMAT_DIR)\stringformat_nibble.c
+OBJS  = $(OBJS)  $(OBJS_DIR)\stringformat_nibble.$(EXT_OBJ)
+!endif
+
+
 
 # --------------------------------------------------
 #  Device Drivers
index 2cd53df..7ada34b 100755 (executable)
                                "process_exit.c",
                                "process_waitexit.c",
                                "process_getexitcode.c",
+                               "process_getparam.c",
+                               "process_setparam.c",
                                "process_setcurrentdir.c",
                                "process_getcurrentdir.c",
                                "process_getparentprocess.c",
                                "event_create.c",
                                "event_delete.c",
                                "event_set.c",
+                               "event_clear.c",
                                "event_wait.c",
                        ]
                ],
                                "drvobj_read.c",
                                "drvobj_seek.c",
                                "drvobj_write.c",
-                               "filefmt.c",
                                "fileobj_constructor.c",
                                "fileobj_create.c",
                                "fileobj_delete.c",
                                "file_readdir.c",
                                "file_seek.c",
                                "file_write.c",
-                               "stdfile.c",
+                               "file_printformat.c",
+                               "file_printformatv.c",
+                               "stdio_printformat.c",
                                "syncdrv_constructor.c",
                                "syncdrv_destructor.c",
                                "syncdrv_endprocess.c",
                                "crc16_table.c",
                        ],
                ],
+               [
+                       "String Format",
+                       "\$(COMMON_HEADERS)",
+                       "\$(HOSAPLFW_DIR)/library/algorithm/stringformat",
+                       "STRINGFORMAT",
+                       "Yes",
+                       [
+                               "stringformat.h",
+                               "stringformat_local.h",
+                       ],
+                       [
+                               "stringformat_formatstring.c",
+                               "stringformat_formatstringv.c",
+                               "stringformat_format.c",
+                               "stringformat_formatv.c",
+                               "stringformat_string.c",
+                               "stringformat_decimal.c",
+                               "stringformat_hexadecimal.c",
+                               "stringformat_nibble.c",
+                       ],
+               ],
        ],
        [
                "Device Drivers",
diff --git a/aplfw/library/algorithm/stringformat/stringformat.h b/aplfw/library/algorithm/stringformat/stringformat.h
new file mode 100755 (executable)
index 0000000..bbd0ab8
--- /dev/null
@@ -0,0 +1,44 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  stringformat.h
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * %jp{浮動小数点などの機能制限をつけた軽量版 printf 作成を目指す}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#ifndef __HOS__stringformat_h__
+#define __HOS__stringformat_h__
+
+
+#include <stdarg.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int StringFormat_FormatString(char *pszBuf, int iBufSize, const char *pszFormat, ...);
+int StringFormat_FormatStringV(char *pszBuf, int iBufSize, const char *pszFormat, va_list argptr);
+
+int StringFormat_Format(int (*pfncPut)(int c, void *Param), void *Param, const char *pszFormat, ...);                                                                          /* 書式付き出力 */        
+int StringFormat_FormatV(int (*pfncPut)(int c, void *Param), void *Param, const char *pszFormat, va_list argptr);                                                      /* 書式付き出力(リスト渡し) */
+
+int StringFormat_Nibble(int (*pfncPut)(int c, void *Param), void *Param, unsigned char n);                                                                                                     /* 4bitの16進数を出力 */
+int StringFormat_Hexadecimal(int (*pfncPut)(int c, void *Param), void *Param, unsigned long ulNum, int iWidth, int iPadChar, int iFlag);       /* 16進数を出力 */
+int StringFormat_Decimal(int (*pfncPut)(int c, void *Param), void *Param, long lNum, int iSigned, int iWidth, int iPadChar, int iFlag);                /* 10進数出力 */
+int StringFormat_String(int (*pfncPut)(int c, void *Param), void *Param, const char *pszStr, int iWidth, int iFlag);                                           /* 文字列出力 */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __HOS__stringformat_h__ */
+
+
+/* end of file */
diff --git a/aplfw/library/algorithm/stringformat/stringformat_decimal.c b/aplfw/library/algorithm/stringformat/stringformat_decimal.c
new file mode 100755 (executable)
index 0000000..4709a81
--- /dev/null
@@ -0,0 +1,105 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+/* 符号付付き10進数出力 */
+int StringFormat_Decimal(int (*pfncPut)(int c, void *Param), void *Param, long lNum, int iSigned, int iWidth, int iPadChar, int iFlag)
+{
+       unsigned long   ulNum;
+       char                    szBuf[10];
+       int                     iLen = 0;
+       int                     iSignChar;
+       int                             iPadSize;
+       int                     iSign;
+       int                     iSize;
+       
+       /* 符号チェック */
+       if ( lNum < 0 && iSigned )
+       {
+               ulNum = -lNum;
+               iSign = 1;
+               iSignChar = '-';
+       }
+       else
+       {
+               ulNum = lNum;
+               iSign = (iFlag == '+') ? 1 : 0;
+               iSignChar = '+';
+       }
+       
+       /* 文字列変換 */
+       iSize = 0;
+       do
+       {
+               szBuf[iSize++] = ulNum % 10 + '0';
+               ulNum         /= 10;
+       } while ( ulNum != 0 );
+       
+       /* パティングサイズ決定 */
+       iPadSize = iWidth - iSize - iSign;
+       
+       /* 左詰属性が無ければ先にパディング */
+       if ( iFlag != '-' )
+       {
+               while ( iWidth > iSize + iSign )
+               {
+                       iWidth--;
+                       if ( pfncPut(iPadChar, Param) <= 0 )
+                       {
+                               return iLen;
+                       }
+                       iLen++;
+               }
+       }
+       
+       /* 符号出力 */
+       if ( iSign )
+       {
+               if ( pfncPut(iSignChar, Param) <= 0 )
+               {
+                       return iLen;
+               }
+               iLen++;
+       }
+       
+       /* 数値出力 */
+       do
+       {
+                if ( pfncPut(szBuf[--iSize], Param) <= 0 )
+               {
+                       return iLen;
+               }
+               iLen++;
+       } while ( iSize > 0);
+               
+       /* 左詰属性なら後ろをパディング */
+       if ( iFlag == '-' )
+       {
+               while ( iPadSize > 0 )
+               {
+                       if ( pfncPut(' ', Param) <= 0 )
+                       {
+                               return iLen;
+                       }
+                       iLen++;
+
+                       iPadSize--;
+               }
+       }
+       
+       return iLen;
+}
+
+
+/* end of file */
diff --git a/aplfw/library/algorithm/stringformat/stringformat_format.c b/aplfw/library/algorithm/stringformat/stringformat_format.c
new file mode 100755 (executable)
index 0000000..350ba79
--- /dev/null
@@ -0,0 +1,30 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+/* 書式付き出力 */       
+int StringFormat_Format(int (*pfncPut)(int c, void *Param), void *Param, const char *pszFormat, ...)
+{
+       va_list argptr;
+       int             iRet;
+
+       va_start(argptr, pszFormat);
+       iRet = StringFormat_FormatV(pfncPut, Param, pszFormat, argptr);
+       va_end(argptr);
+       
+       return iRet;
+}
+
+
+/* end of file */
diff --git a/aplfw/library/algorithm/stringformat/stringformat_formatstring.c b/aplfw/library/algorithm/stringformat/stringformat_formatstring.c
new file mode 100755 (executable)
index 0000000..6667106
--- /dev/null
@@ -0,0 +1,30 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+/* sprintfもどき */ 
+int StringFormat_FormatString(char *pszBuf, int iBufSize, const char *pszFormat, ...)
+{
+       va_list argptr;
+       int             iRet;
+
+       va_start(argptr, pszFormat);
+       iRet = StringFormat_FormatStringV(pszBuf, iBufSize, pszFormat, argptr);
+       va_end(argptr);
+       
+       return iRet;
+}
+
+
+/* end of file */
diff --git a/aplfw/library/algorithm/stringformat/stringformat_formatstringv.c b/aplfw/library/algorithm/stringformat/stringformat_formatstringv.c
new file mode 100755 (executable)
index 0000000..d19dbaf
--- /dev/null
@@ -0,0 +1,57 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+typedef struct t_stringformat_formatstring_info
+{
+       char    *pszBuf;
+       int             iBufSize;
+} T_STRINGFORAMT_FORMATSTRING_INFO;
+
+
+static int StringFormat_OutputFormatStringV(int c, void *Param);
+
+
+/* vsprintfもどき */        
+int StringFormat_FormatStringV(char *pszBuf, int iBufSize, const char *pszFormat, va_list argptr)
+{
+       T_STRINGFORAMT_FORMATSTRING_INFO Info;
+       
+       /* バッファ情報生成 */
+       Info.pszBuf   = pszBuf;
+       Info.iBufSize = iBufSize;
+
+       return StringFormat_FormatV(StringFormat_OutputFormatStringV, (void *)&Info, pszFormat, argptr);
+}
+
+
+int StringFormat_OutputFormatStringV(int c, void *Param)
+{
+       T_STRINGFORAMT_FORMATSTRING_INFO *pInfo;
+       
+       pInfo = (T_STRINGFORAMT_FORMATSTRING_INFO *)Param;
+       
+       if ( pInfo->iBufSize <= 0 )
+       {
+               return 0;
+       }
+       
+       *pInfo->pszBuf++ = (char)c;
+       pInfo->iBufSize--;
+       
+       return 1;
+}
+
+
+
+/* end of file */
diff --git a/aplfw/library/algorithm/stringformat/stringformat_formatv.c b/aplfw/library/algorithm/stringformat/stringformat_formatv.c
new file mode 100755 (executable)
index 0000000..2d82f7b
--- /dev/null
@@ -0,0 +1,185 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+#define STRINGFORMAT_FORMAT_NORMAL             0
+#define STRINGFORMAT_FORMAT_ESC                        1
+
+
+
+/* 書式付き出力(リスト渡し) */
+int StringFormat_FormatV(int (*pfncPut)(int c, void *Param), void *Param, const char *pszFormat, va_list argptr)
+{
+       int     iState = STRINGFORMAT_FORMAT_NORMAL;
+       int     iLong;
+       int     iPadChar;
+       int     iWidth;
+       int iFlag;
+       int iTmpLen;
+       int     iLen = 0;
+       int     c;
+       
+       while ( (c = *pszFormat++) != '\0' )
+       {
+               switch ( iState )
+               {
+               case STRINGFORMAT_FORMAT_NORMAL:
+                       if ( c == '%' )
+                       {
+                               iLong     = 0;
+                               iWidth    = 0;
+                               iFlag     = ' ';
+                               iPadChar  = ' ';
+                               iState    = STRINGFORMAT_FORMAT_ESC;
+                       }
+                       else
+                       {
+                               /* 1文字出力 */
+                               if ( pfncPut(c, Param) <= 0 )
+                               {
+                                       return iLen;
+                               }
+                               iLen++;
+                       }
+                       break;
+
+               case STRINGFORMAT_FORMAT_ESC:
+                       if ( c == '%' )
+                       {
+                               /* 1文字出力 */
+                               if ( pfncPut(c, Param) <= 0 )
+                               {
+                                       return iLen;
+                               }
+                               iLen++;
+                               iState = STRINGFORMAT_FORMAT_NORMAL;
+                       }
+                       else if ( c == '+' || c == '-' )
+                       {
+                               iFlag = c;      
+                       }
+                       else if ( c >= '0' && c <= '9' )
+                       {
+                               /* 表示読込み */
+                               c -= '0';
+                               iWidth = (iWidth * 10) + c;
+                               if ( iWidth == 0 )
+                               {
+                                       iPadChar = '0';
+                               }
+                       }
+                       else if ( c == 'l' )
+                       {
+                               iLong = 1;
+                       }
+                       else if ( c == 'd' || c == 'x' || c == 'X' )
+                       {
+                               long lNum;
+                               
+                               /* 引数取り出し */
+                               if ( iLong )
+                               {
+                                       lNum = va_arg(argptr, long);
+                               }
+                               else
+                               {
+                                       lNum = va_arg(argptr, int);
+                               }
+
+                               if ( c == 'd' )
+                               {
+                                       /* 符号付き10進数出力 */
+                                       iTmpLen = StringFormat_Decimal(pfncPut, Param, lNum, 1, iWidth, iPadChar, iFlag);
+                                       if ( iTmpLen <= 0 )
+                                       {
+                                               return iLen;
+                                       }
+                                       iLen += iTmpLen;
+                               }
+                               else
+                               {
+                                       /* 16進数出力 */
+                                       iTmpLen = StringFormat_Hexadecimal(pfncPut, Param, lNum, iWidth, iPadChar, iFlag);
+                                       if ( iTmpLen <= 0 )
+                                       {
+                                               return iLen;
+                                       }
+                                       iLen += iTmpLen;
+                               }
+                               
+                               iState = STRINGFORMAT_FORMAT_NORMAL;
+                       }
+                       else if ( c == 'u' )
+                       {
+                               unsigned long ulNum;
+                               
+                               
+                               /* 引数取り出し */
+                               if ( iLong )
+                               {
+                                       ulNum = va_arg(argptr, unsigned long);
+                               }
+                               else
+                               {
+                                       ulNum = va_arg(argptr, unsigned int);
+                               }
+
+                               /* 符号無し10進数出力 */
+                               iTmpLen = StringFormat_Decimal(pfncPut, Param, (long)ulNum, 0, iWidth, iPadChar, iFlag);
+                               if ( iTmpLen <= 0 )
+                               {
+                                       return iLen;
+                               }
+                               iLen += iTmpLen;
+                               
+                               iState = STRINGFORMAT_FORMAT_NORMAL;                            
+                       }
+                       else if ( c == 's' )
+                       {
+                               const char *pszStr;
+                               
+                               /* 引数取り出し */
+                               pszStr  = va_arg(argptr, const char *);
+                               
+                               /* 文字列出力 */
+                               iTmpLen = StringFormat_String(pfncPut, Param, pszStr, iWidth, iFlag);
+                               if ( iTmpLen <= 0 )
+                               {
+                                       return iLen;
+                               }
+                               iLen += iTmpLen;
+                               
+                               
+                               iState  = STRINGFORMAT_FORMAT_NORMAL;
+                       }
+                       else
+                       {
+                               /* 1文字出力 */
+                               if ( pfncPut(c, Param) <= 0 )
+                               {
+                                       return iLen;
+                               }
+                               iLen++;
+                               iState = STRINGFORMAT_FORMAT_NORMAL;
+                       }
+                       break;
+               }
+       }
+
+       return iLen;
+}
+
+
+
+/* end of file */
diff --git a/aplfw/library/algorithm/stringformat/stringformat_hexadecimal.c b/aplfw/library/algorithm/stringformat/stringformat_hexadecimal.c
new file mode 100755 (executable)
index 0000000..083a21a
--- /dev/null
@@ -0,0 +1,84 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+/* 16進数を出力 */
+int StringFormat_Hexadecimal(int (*pfncPut)(int c, void *Param), void *Param, unsigned long ulNum, int iWidth, int iPadChar, int iFlag)
+{
+       unsigned long   ulTmp;
+       int                             iLen = 0;
+       int                             iSize = 0;
+       int                             iPadSize;
+       
+       
+       /* 最低限表示に必要なサイズを算出 */
+       ulTmp = ulNum;
+       do
+       {
+               iSize++;
+               ulTmp >>= 4;
+       } while ( ulTmp != 0 );
+       
+       /* パティングサイズ決定 */
+       iPadSize = iWidth - iSize;
+       
+       /* 左詰属性が無ければ先にパディング */
+       if ( iFlag != '-' )
+       {
+               while ( iPadSize > 0 )
+               {
+                       if ( pfncPut(iPadChar, Param) <= 0 )
+                       {
+                               return iLen;
+                       }
+                       iLen++;
+
+                       iPadSize--;
+               }
+       }
+       
+       /* 上位桁から順に出力 */
+       iSize = (iSize - 1) * 4;
+       do
+       {
+               if ( StringFormat_Nibble(pfncPut, Param, (unsigned char)(ulNum >> iSize)) <= 0 )
+               {
+                       return iLen;
+               }
+               iLen++;
+               
+               iSize -= 4;
+       } while ( iSize >= 0 );
+       
+       
+       /* 左詰属性なら後ろをパディング */
+       if ( iFlag == '-' )
+       {
+               while ( iPadSize > 0 )
+               {
+                       if ( pfncPut(' ', Param) <= 0 )
+                       {
+                               return iLen;
+                       }
+                       iLen++;
+
+                       iPadSize--;
+               }
+       }
+       
+       return iLen;
+}
+
+
+/* end of file */
diff --git a/aplfw/library/algorithm/stringformat/stringformat_local.h b/aplfw/library/algorithm/stringformat/stringformat_local.h
new file mode 100755 (executable)
index 0000000..c3432ec
--- /dev/null
@@ -0,0 +1,24 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  stringformat.h
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * %jp{浮動小数点などの機能制限をつけた軽量版 printf 作成を目指す}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#ifndef __HOS__stringformat_local_h__
+#define __HOS__stringformat_local_h__
+
+
+#include "stringformat.h"
+
+
+#endif /* __HOS__stringformat_local_h__ */
+
+
+/* end of file */
diff --git a/aplfw/library/algorithm/stringformat/stringformat_nibble.c b/aplfw/library/algorithm/stringformat/stringformat_nibble.c
new file mode 100755 (executable)
index 0000000..0112aea
--- /dev/null
@@ -0,0 +1,32 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stringformat_local.h"
+
+
+
+/* 4bitの16進数を出力 */
+int StringFormat_Nibble(int (*pfncPut)(int c, void *Param), void *Param, unsigned char n)
+{
+       n &= 0xf;
+       if ( n < 10 )
+       {
+               n = n + '0';
+       }
+       else
+       {
+               n = n - 10 + 'a';
+       }
+       return pfncPut((int)n, Param);
+}
+
+
+/* end of file */
diff --git a/aplfw/library/algorithm/stringformat/stringformat_string.c b/aplfw/library/algorithm/stringformat/stringformat_string.c
new file mode 100755 (executable)
index 0000000..a4f1f8e
--- /dev/null
@@ -0,0 +1,77 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  stringformat.c
+ * @brief %jp{文字列フォーマット生成ライブラリ}
+ *
+ * Copyright (C) 2008 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include <string.h>
+#include "stringformat_local.h"
+
+
+
+/* 16進数を出力 */
+int StringFormat_String(int (*pfncPut)(int c, void *Param), void *Param, const char *pszStr, int iWidth, int iFlag)
+{
+       int     iLen = 0;
+       int     iSize = 0;
+       int     iPadSize;
+       
+       /* 最低限表示に必要なサイズを算出 */
+       iSize = strlen(pszStr);
+       
+       /* パティングサイズ決定 */
+       iPadSize = iWidth - iSize;
+       
+       /* 左詰属性が無ければ先にパディング */
+       if ( iFlag != '-' )
+       {
+               while ( iPadSize > 0 )
+               {
+                       if ( pfncPut(' ', Param) <= 0 )
+                       {
+                               return iLen;
+                       }
+                       iLen++;
+
+                       iPadSize--;
+               }
+       }
+       
+       /* 文字列出力 */
+       while ( iSize > 0 )
+       {
+               if ( pfncPut(*pszStr++, Param) <= 0 )
+               {
+                       return iLen;
+               }
+               iLen++;
+       
+               iSize--;
+       }
+       
+       
+       /* 左詰属性なら後ろをパディング */
+       if ( iFlag == '-' )
+       {
+               while ( iPadSize > 0 )
+               {
+                       if ( pfncPut(' ', Param) <= 0 )
+                       {
+                               return iLen;
+                       }
+                       iLen++;
+
+                       iPadSize--;
+               }
+       }
+       
+       return iLen;
+}
+
+
+/* end of file */
diff --git a/aplfw/system/event/event_clear.c b/aplfw/system/event/event_clear.c
new file mode 100755 (executable)
index 0000000..a90304f
--- /dev/null
@@ -0,0 +1,30 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  event.h
+ * @brief %jp{イベントオブジェクト}
+ *
+ * Copyright (C) 2006-2007 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "event_local.h"
+
+
+/* イベントクリア */
+EVENT_ERR Event_Clear(HANDLE hEvent)
+{
+       C_EVENT *self;
+       
+       /* キャスト */
+       self = (C_EVENT *)hEvent;
+       
+       /* イベント待ち */
+       SysEvt_Clear(self->hSysEvt);
+       
+       return EVENT_ERR_OK;
+}
+
+
+/* end of file */
index 9963120..26edfdb 100755 (executable)
@@ -18,7 +18,7 @@
 
 
 #define FILE_MAX_PATH                                          128                     /* パス名の最大値 */
-#define FILE_MAX_NAME                                          12                      /* 名前の最大値 */
+#define FILE_MAX_NAME                                          13                      /* 名前の最大値 */
 
 
 /* エラーコード定義 */
diff --git a/aplfw/system/file/file_printformat.c b/aplfw/system/file/file_printformat.c
new file mode 100755 (executable)
index 0000000..4577765
--- /dev/null
@@ -0,0 +1,32 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  file.c
+ * @brief %jp{ファイルシステム}
+ *
+ * Copyright (C) 2006 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include <stdio.h>
+#include <string.h>
+#include "file_local.h"
+#include "system/sysapi/sysapi.h"
+
+
+/* 書式付出力 */
+int File_PrintFormat(HANDLE hFile, const char *pszFormat, ...)
+{
+       va_list argptr;
+       int iRet;
+       
+       va_start(argptr, pszFormat);
+       iRet = File_PrintFormatV(hFile, pszFormat, argptr);
+       va_end(argptr);
+       
+       return iRet;
+}
+
+
+/* end of file */
diff --git a/aplfw/system/file/file_printformatv.c b/aplfw/system/file/file_printformatv.c
new file mode 100755 (executable)
index 0000000..f158446
--- /dev/null
@@ -0,0 +1,48 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  file.c
+ * @brief %jp{ファイルシステム}
+ *
+ * Copyright (C) 2006 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include <stdio.h>
+#include <string.h>
+#include "file_local.h"
+#include "system/sysapi/sysapi.h"
+#include "library/algorithm/stringformat/stringformat.h"
+
+
+
+static int File_OutputPrintFormat(int c, void *Param);         /* 書式ライブラリ用コールバック関数 */
+
+
+
+/* 書式付出力(リスト渡し) */
+int File_PrintFormatV(HANDLE hFile, const char *pszFormat, va_list argptr)
+{
+       return StringFormat_FormatV(File_OutputPrintFormat, (void *)hFile, pszFormat, argptr);
+}
+
+
+/* 書式ライブラリ用コールバック関数 */
+int File_OutputPrintFormat(int c, void *Param)
+{
+       HANDLE hFile;
+       
+       hFile = (HANDLE)Param;
+       
+       /* 結果をファイルシステムへリダイレクト */
+       if ( File_PutChar(hFile, c) == FILE_EOF )
+       {
+               return 0;
+       }
+       
+       return 1;
+}
+
+
+/* end of file */
diff --git a/aplfw/system/file/filefmt.c b/aplfw/system/file/filefmt.c
deleted file mode 100755 (executable)
index 0d30eb9..0000000
+++ /dev/null
@@ -1,257 +0,0 @@
-/** 
- *  Hyper Operating System  Application Framework
- *
- * @file  file.c
- * @brief %jp{ファイルシステム}
- *
- * Copyright (C) 2006 by Project HOS
- * http://sourceforge.jp/projects/hos/
- */
-
-
-#include <stdio.h>
-#include <string.h>
-#include "file_local.h"
-#include "system/sysapi/sysapi.h"
-#include "system/memory/memory.h"
-
-
-int File_PrintFormatV(HANDLE hFile, const char *pszFormat, va_list argptr)
-{
-       char *pBuf;
-       int  iRet = 0;
-       
-       pBuf = (char *)Memory_Alloc(128);
-       if ( pBuf != NULL )
-       {
-       /*      iRet = vsprintf(pBuf, pszFormat, argptr);       */      /* 肥大化するのでちと保留 */
-               if ( iRet > 0 )
-               {
-                       iRet = File_Write(hFile, pBuf, iRet);
-               }
-               Memory_Free(pBuf);
-       }
-
-       return iRet;
-}
-
-
-int File_PrintFormat(HANDLE hFile, const char *pszFormat, ...)
-{
-       va_list argptr;
-       int iRet;
-
-       va_start(argptr, pszFormat);
-       iRet = File_PrintFormatVL(hFile, pszFormat, argptr);
-       va_end(argptr);
-
-       return iRet;
-}
-
-
-/* 4bitの16進数を出力 */
-int File_PrintHexNibble(HANDLE hFile, unsigned char c)
-{
-       c &= 0xf;
-       if ( c < 10 )
-       {
-               c = c + '0';
-       }
-       else
-       {
-               c = c - 10 + 'a';
-       }
-       return File_PutChar(hFile, c);
-}
-
-/* n桁の16進数を出力 */
-int File_PrintHex(HANDLE hFile, unsigned long ulData, int n)
-{
-       int iLen = 0;
-       int i;
-
-       for ( i = (n - 1) * 4 ; i >= 0; i-- )
-       {
-               if ( File_PrintHexNibble(hFile, (unsigned char)(ulData >> i)) == FILE_EOF )
-               {
-                       break;
-               }
-               iLen++;
-       }
-       
-       if ( iLen == 0 )
-       {
-               return FILE_EOF;
-       }
-       return iLen;
-}
-
-
-/* 書式付き10進数出力 */
-int File_PrintFormatDecimal(HANDLE hFile, long lNum, int iWidth, int iPadChar)
-{
-       char szBuf[12];
-       int  iLen = 0;
-       int  iSign = 0;
-       int  i;
-
-       /* 符号チェック */
-       if ( lNum < 0 )
-       {
-               lNum  = -lNum;
-               iSign = 1;
-       }
-
-       /* 文字列変換 */
-       i = sizeof(szBuf);
-       szBuf[--i] = '\0';
-       do
-       {
-               szBuf[--i] = lNum % 10 + '0';
-               lNum       = lNum / 10;
-       } while ( lNum != 0 );
-       
-       /* 符号付加 */
-       if ( iSign )
-       {
-               szBuf[--i] = '-';
-       }
-
-       iWidth -= (sizeof(szBuf) - i - 1);
-       while ( iWidth > 0 )
-       {
-               File_PutChar(hFile, iPadChar);
-               iWidth--;
-               iLen++;
-       }
-       
-       iLen += File_PutString(hFile, &szBuf[i]);
-
-       return iLen;
-}
-
-
-int File_PrintFormatHex(HANDLE hFile, long lNum, int iWidth, int iPadChar)
-{
-       char szBuf[9];
-       int  iLen = 0;
-       int  i;
-       
-       /* 文字列変換 */
-       i = sizeof(szBuf);
-       szBuf[--i] = '\0';
-       do
-       {
-               szBuf[--i]   = (lNum & 0xf) < 10 ? (lNum & 0xf) + '0' : (lNum & 0xf) - 10 + 'a';
-               lNum = ((unsigned long)lNum >> 4);
-       } while ( lNum != 0 );
-       
-       iWidth -= (sizeof(szBuf) - i - 1);
-       while ( iWidth > 0 )
-       {
-               File_PutChar(hFile, iPadChar);
-               iWidth--;
-               iLen++;
-       }
-       
-       iLen += File_PutString(hFile, &szBuf[i]);
-       
-       return iLen;
-}
-
-
-
-#define FILE_PRTFMT_NORMAL             0
-#define FILE_PRTFMT_ESC                        1
-#define FILE_PRTFMT_WIDTH              2
-
-/* 書式付き出力軽量版 */
-int File_PrintFormatVL(HANDLE hFile, const char *pszFormat, va_list argptr)
-{
-       int iState = FILE_PRTFMT_NORMAL;
-       int iLong;
-       int iPadChar;
-       int iWidth;
-       int iLen = 0;
-       int c;
-       
-       while ( (c = *pszFormat++) != '\0' )
-       {
-               switch ( iState )
-               {
-               case FILE_PRTFMT_NORMAL:
-                       if ( c == '%' )
-                       {
-                               iLong    = 0;
-                               iWidth   = 0;
-                               iPadChar = ' ';
-                               iState   = FILE_PRTFMT_ESC;
-                       }
-                       else
-                       {
-                               iLen += (File_PutChar(hFile, c) != FILE_EOF);
-                       }
-                       break;
-
-               case FILE_PRTFMT_ESC:
-                       if ( c == '%' )
-                       {
-                               iLen += (File_PutChar(hFile, c) != FILE_EOF);
-                               iState = FILE_PRTFMT_NORMAL;
-                       }
-                       else if ( c >= '0' && c <= '9' )
-                       {
-                               c -= '0';
-                               iWidth = (iWidth * 10) + c;
-                               if ( iWidth == 0 )
-                               {
-                                       iPadChar = '0';
-                               }
-                       }
-                       else if ( c == 'l' )
-                       {
-                               iLong = 1;
-                       }
-                       else if ( c == 'd' || c == 'x' || c == 'X' )
-                       {
-                               long lNum;
-                               if ( iLong )
-                               {
-                                       lNum = va_arg(argptr, long);
-                               }
-                               else
-                               {
-                                       lNum = va_arg(argptr, int);
-                               }
-
-                               if ( c == 'd' )
-                               {
-                                       iLen += File_PrintFormatDecimal(hFile, lNum, iWidth, iPadChar);
-                               }
-                               else
-                               {
-                                       iLen += File_PrintFormatHex(hFile, lNum, iWidth, iPadChar);
-                               }
-                               iState = FILE_PRTFMT_NORMAL;
-                       }
-                       else if ( c == 's' )
-                       {
-                               const char *pszStr;
-                               pszStr  = va_arg(argptr, const char *);
-                               iLen   += File_PutString(hFile, pszStr);
-                               iState  = FILE_PRTFMT_NORMAL;
-                       }
-                       else
-                       {
-                               iLen += (File_PutChar(hFile, c) != FILE_EOF);
-                               iState = FILE_PRTFMT_NORMAL;
-                       }
-                       break;
-               }
-       }
-
-       return iLen;
-}
-
-
-/* end of file */
diff --git a/aplfw/system/file/stdfile.c b/aplfw/system/file/stdfile.c
deleted file mode 100755 (executable)
index 22eb004..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "stdfile.h"
-
-int StdIo_PrintFormat(const char *pszFormat, ...)
-{
-       va_list argptr;
-       int iRet;
-
-       va_start(argptr, pszFormat);
-       iRet = File_PrintFormatVL(Process_GetStdOut(HANDLE_NULL), pszFormat, argptr);
-       va_end(argptr);
-
-       return iRet;
-}
-
-
index a2b354f..087c8c0 100755 (executable)
@@ -4,7 +4,7 @@
  * @file  file.h
  * @brief %jp{ファイルシステム}
  *
- * Copyright (C) 2006 by Project HOS
+ * Copyright (C) 2006-2008 by Project HOS
  * http://sourceforge.jp/projects/hos/
  */
 
@@ -12,6 +12,7 @@
 #ifndef __HOS__stdfile_h__
 #define __HOS__stdfile_h__
 
+
 #include "system/file/file.h"
 #include "system/process/process.h"
 
@@ -39,6 +40,7 @@ int     StdIo_PrintFormat(const char *pszFormat, ...);
 #endif
 
 
+
 #endif /* __HOS__stdfile_h__ */
 
 
diff --git a/aplfw/system/file/stdio_printformat.c b/aplfw/system/file/stdio_printformat.c
new file mode 100755 (executable)
index 0000000..68bde22
--- /dev/null
@@ -0,0 +1,28 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  file.h
+ * @brief %jp{ファイルシステム}
+ *
+ * Copyright (C) 2006 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "stdfile.h"
+
+
+int StdIo_PrintFormat(const char *pszFormat, ...)
+{
+       va_list argptr;
+       int iRet;
+
+       va_start(argptr, pszFormat);
+       iRet = File_PrintFormatV(Process_GetStdOut(HANDLE_NULL), pszFormat, argptr);
+       va_end(argptr);
+
+       return iRet;
+}
+
+
+/* end of file */
diff --git a/aplfw/system/process/process_getparam.c b/aplfw/system/process/process_getparam.c
new file mode 100755 (executable)
index 0000000..691a985
--- /dev/null
@@ -0,0 +1,37 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  process.c
+ * @brief %jp{プロセスオブジェクト}
+ *
+ * Copyright (C) 2006-2007 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+
+#include "process_local.h"
+
+
+
+/** プロセス固有情報の取得 */
+VPARAM Process_GetParam(HANDLE hProcess)
+{
+       C_PROCESS *self;
+       
+       /* 指定が無ければ現在のプロセスとする */
+       if ( hProcess == HANDLE_NULL )
+       {
+               hProcess = Process_GetCurrentHandle();
+       }
+       
+       /* ハンドルをキャスト */
+       self = (C_PROCESS *)hProcess;
+       
+       /* パラメータを返す */
+       return self->Param;
+}
+
+
+
+/* end of file */
diff --git a/aplfw/system/process/process_setparam.c b/aplfw/system/process/process_setparam.c
new file mode 100755 (executable)
index 0000000..fffff4f
--- /dev/null
@@ -0,0 +1,36 @@
+/** 
+ *  Hyper Operating System  Application Framework
+ *
+ * @file  process.c
+ * @brief %jp{プロセスオブジェクト}
+ *
+ * Copyright (C) 2006-2007 by Project HOS
+ * http://sourceforge.jp/projects/hos/
+ */
+
+
+#include "process_local.h"
+
+
+
+/** プロセス固有情報の設定 */
+void Process_SetParam(HANDLE hProcess, VPARAM Param)
+{
+       C_PROCESS *self;
+       
+       /* 指定が無ければ現在のプロセスとする */
+       if ( hProcess == HANDLE_NULL )
+       {
+               hProcess = Process_GetCurrentHandle();
+       }
+       
+       /* ハンドルをキャスト */
+       self = (C_PROCESS *)hProcess;
+       
+       /* パラメータを設定 */
+       self->Param = Param;
+}
+
+
+
+/* end of file */
index 8f1ed9b..e0f5ff5 100755 (executable)
@@ -40,8 +40,12 @@ C言語構文(例えばtypedefなど)はこの中には記載せず、マクロ
 #define _KERNEL_CFG_ACT_TSK_E_NOEXS            TRUE
 #define _KERNEL_CFG_ACT_TSK_E_NOSPT            FALSE
 
-
 /* iact_tsk */
+#define _KERNEL_CFG_IACT_TSK_E_ID              TRUE
+#define _KERNEL_CFG_IACT_TSK_E_CTX             TRUE    
+#define _KERNEL_CFG_IACT_TSK_E_NOEXS   TRUE
+#define _KERNEL_CFG_IACT_TSK_E_NOSPT   FALSE
+
 /* can_act */
 #define _KERNEL_CFG_CAN_ACT_E_ID               TRUE
 #define _KERNEL_CFG_CAN_ACT_E_NOEXS            TRUE
@@ -75,6 +79,7 @@ C言語構文(例えばtypedefなど)はこの中には記載せず、マクロ
 /* wup_tsk */
 #define _KERNEL_CFG_WUP_TSK_E_ID               TRUE
 #define _KERNEL_CFG_WUP_TSK_E_NOEXS            TRUE
+#define _KERNEL_CFG_WUP_TSK_E_QOVR             TRUE
 
 /* iwup_tsk */
 /* can_wup */
@@ -142,6 +147,10 @@ C言語構文(例えばtypedefなど)はこの中には記載せず、マクロ
 #define _KERNEL_CFG_SIG_SEM_E_NOSPT            FALSE
 
 /* isig_sem */
+#define _KERNEL_CFG_ISIG_SEM_E_ID              TRUE
+#define _KERNEL_CFG_ISIG_SEM_E_NOEXS   TRUE
+#define _KERNEL_CFG_ISIG_SEM_E_QOVR            TRUE    
+#define _KERNEL_CFG_ISIG_SEM_E_NOSPT   FALSE
 
 /* wai_sem */
 #define _KERNEL_CFG_WAI_SEM_E_ID               TRUE
@@ -198,6 +207,10 @@ C言語構文(例えばtypedefなど)はこの中には記載せず、マクロ
 #define _KERNEL_CFG_SET_FLG_E_NOSPT            FALSE
 
 /* iset_flg */
+#define _KERNEL_CFG_ISET_FLG_E_ID              TRUE
+#define _KERNEL_CFG_ISET_FLG_E_NOEXS   TRUE
+#define _KERNEL_CFG_ISET_FLG_E_NOSPT   FALSE
+
 /* clr_flg */
 #define _KERNEL_CFG_CLR_FLG_E_ID               TRUE
 #define _KERNEL_CFG_CLR_FLG_E_NOEXS            TRUE
@@ -241,15 +254,47 @@ C言語構文(例えばtypedefなど)はこの中には記載せず、マクロ
 
 
 /* cre_dtq */
+#define _KERNEL_CFG_CRE_DTQ_E_ID               TRUE
+#define _KERNEL_CFG_CRE_DTQ_E_RSATR            TRUE
+#define _KERNEL_CFG_CRE_DTQ_E_OBJ              TRUE
+#define _KERNEL_CFG_CRE_DTQ_E_NOMEM            TRUE
+#define _KERNEL_CFG_CRE_DTQ_E_NOSPT            FALSE
+
 /* acre_dtq */
+#define _KERNEL_CFG_ACRE_DTQ_E_RSATR   TRUE
+#define _KERNEL_CFG_ACRE_DTQ_E_NOID            TRUE    
+#define _KERNEL_CFG_ACRE_DTQ_E_NOMEM   TRUE
+#define _KERNEL_CFG_ACRE_DTQ_E_NOSPT   FALSE
+
 /* del_dtq */
 /* snd_dtq */
+#define _KERNEL_CFG_SND_DTQ_E_CTX              TRUE
+#define _KERNEL_CFG_SND_DTQ_E_ID               TRUE
+#define _KERNEL_CFG_SND_DTQ_E_NOEXS            TRUE
+#define _KERNEL_CFG_SND_DTQ_E_NOSPT            FALSE
+
 /* ipsnd_dtq */
 /* tsnd_dtq */
 /* fsnd_dtq */
+#define _KERNEL_CFG_FSND_DTQ_E_ID              TRUE
+#define _KERNEL_CFG_FSND_DTQ_E_NOEXS   TRUE
+#define _KERNEL_CFG_FSND_DTQ_E_ILUSE   TRUE
+#define _KERNEL_CFG_FSND_DTQ_E_NOSPT   FALSE
+
 /* ifsnd_dtq */
+
 /* rcv_dtq */
+#define _KERNEL_CFG_RCV_DTQ_E_CTX              TRUE
+#define _KERNEL_CFG_RCV_DTQ_E_ID               TRUE
+#define _KERNEL_CFG_RCV_DTQ_E_NOEXS            TRUE
+#define _KERNEL_CFG_RCV_DTQ_E_NOSPT            FALSE
+
 /* prcv_dtq */
+#define _KERNEL_CFG_PRCV_DTQ_E_CTX             TRUE
+#define _KERNEL_CFG_PRCV_DTQ_E_ID              TRUE
+#define _KERNEL_CFG_PRCV_DTQ_E_NOEXS   TRUE
+#define _KERNEL_CFG_PRCV_DTQ_E_NOSPT   FALSE
+
 /* trcv_dtq */
 /* ref_dtq */
 
@@ -275,6 +320,10 @@ C言語構文(例えばtypedefなど)はこの中には記載せず、マクロ
 
 /* snd_mbx */
 /* rcv_mbx */
+#define _KERNEL_CFG_RCV_MBX_E_ID               TRUE
+#define _KERNEL_CFG_RCV_MBX_E_NOEXS            TRUE
+#define _KERNEL_CFG_RCV_MBX_E_NOSPT            FALSE
+
 /* prcv_mbx */
 /* trcv_mbx */
 /* ref_mbx */
index 5c003f7..094d2ae 100755 (executable)
 
 
 /* iact_tsk */
+#define _KERNEL_SPT_IACT_TSK_E_ID              _KERNEL_SPT_E_ID        (_KERNEL_SPT_IACT_TSK_E_ID)
+#define _KERNEL_SPT_IACT_TSK_E_CTX             _KERNEL_SPT_E_CTX       (_KERNEL_SPT_IACT_TSK_E_CTX)    
+#define _KERNEL_SPT_IACT_TSK_E_NOEXS   _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_IACT_TSK_E_NOEXS)
+#define _KERNEL_SPT_IACT_TSK_E_NOSPT   _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_IACT_TSK_E_NOSPT)
+
+
 /* can_act */
 #define _KERNEL_SPT_CAN_ACT_E_ID               _KERNEL_SPT_E_ID        (_KERNEL_CFG_CAN_ACT_E_ID)
 #define _KERNEL_SPT_CAN_ACT_E_NOEXS            _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_CAN_ACT_E_NOEXS)
 /* wup_tsk */
 #define _KERNEL_SPT_WUP_TSK_E_ID               _KERNEL_SPT_E_ID        (_KERNEL_CFG_WUP_TSK_E_ID)
 #define _KERNEL_SPT_WUP_TSK_E_NOEXS            _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_WUP_TSK_E_NOEXS)
+#define _KERNEL_SPT_WUP_TSK_E_QOVR             _KERNEL_SPT_E_QOVR      (_KERNEL_CFG_WUP_TSK_E_QOVR)
 
 /* iwup_tsk */
 /* can_wup */
 #define _KERNEL_SPT_SIG_SEM_E_NOSPT            _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_SIG_SEM_E_NOSPT)
 
 /* isig_sem */
+#define _KERNEL_SPT_ISIG_SEM_E_ID              _KERNEL_SPT_E_ID        (_KERNEL_CFG_ISIG_SEM_E_ID)
+#define _KERNEL_SPT_ISIG_SEM_E_NOEXS   _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_ISIG_SEM_E_NOEXS)
+#define _KERNEL_SPT_ISIG_SEM_E_QOVR            _KERNEL_SPT_E_QOVR      (_KERNEL_CFG_ISIG_SEM_E_QOVR)   
+#define _KERNEL_SPT_ISIG_SEM_E_NOSPT   _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_ISIG_SEM_E_NOSPT)
 
 /* wai_sem */
 #define _KERNEL_SPT_WAI_SEM_E_ID               _KERNEL_SPT_E_ID        (_KERNEL_CFG_WAI_SEM_E_ID)
 #define _KERNEL_SPT_SET_FLG_E_NOSPT            _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_SET_FLG_E_NOSPT)
 
 /* iset_flg */
+#define _KERNEL_SPT_ISET_FLG_E_ID              _KERNEL_SPT_E_ID        (_KERNEL_CFG_ISET_FLG_E_ID)
+#define _KERNEL_SPT_ISET_FLG_E_NOEXS   _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_ISET_FLG_E_NOEXS)
+#define _KERNEL_SPT_ISET_FLG_E_NOSPT   _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_ISET_FLG_E_NOSPT)
+
 /* clr_flg */
 #define _KERNEL_SPT_CLR_FLG_E_ID               _KERNEL_SPT_E_ID        (_KERNEL_CFG_CLR_FLG_E_ID)
 #define _KERNEL_SPT_CLR_FLG_E_NOEXS            _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_CLR_FLG_E_NOEXS)
 
 
 /* cre_dtq */
+#define _KERNEL_SPT_CRE_DTQ_E_ID               _KERNEL_SPT_E_ID        (_KERNEL_CFG_CRE_DTQ_E_ID)
+#define _KERNEL_SPT_CRE_DTQ_E_RSATR            _KERNEL_SPT_E_RSATR     (_KERNEL_CFG_CRE_DTQ_E_RSATR)
+#define _KERNEL_SPT_CRE_DTQ_E_OBJ              _KERNEL_SPT_E_OBJ       (_KERNEL_CFG_CRE_DTQ_E_OBJ)
+#define _KERNEL_SPT_CRE_DTQ_E_NOMEM            _KERNEL_SPT_E_NOMEM     (_KERNEL_CFG_CRE_DTQ_E_NOMEM)
+#define _KERNEL_SPT_CRE_DTQ_E_NOSPT            _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_CRE_DTQ_E_NOSPT)
+
 /* acre_dtq */
+#define _KERNEL_SPT_ACRE_DTQ_E_RSATR   _KERNEL_SPT_E_RSATR     (_KERNEL_CFG_ACRE_DTQ_E_RSATR)
+#define _KERNEL_SPT_ACRE_DTQ_E_NOID            _KERNEL_SPT_E_NOID      (_KERNEL_CFG_ACRE_DTQ_E_NOID)   
+#define _KERNEL_SPT_ACRE_DTQ_E_NOMEM   _KERNEL_SPT_E_NOMEM     (_KERNEL_CFG_ACRE_DTQ_E_NOMEM)
+#define _KERNEL_SPT_ACRE_DTQ_E_NOSPT   _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_ACRE_DTQ_E_NOSPT)
+
 /* del_dtq */
 /* snd_dtq */
+#define _KERNEL_SPT_SND_DTQ_E_CTX              _KERNEL_SPT_E_CTX       (_KERNEL_CFG_SND_DTQ_E_CTX)
+#define _KERNEL_SPT_SND_DTQ_E_ID               _KERNEL_SPT_E_ID        (_KERNEL_CFG_SND_DTQ_E_ID)
+#define _KERNEL_SPT_SND_DTQ_E_NOEXS            _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_SND_DTQ_E_NOEXS)
+#define _KERNEL_SPT_SND_DTQ_E_NOSPT            _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_SND_DTQ_E_NOSPT)
+
 /* ipsnd_dtq */
 /* tsnd_dtq */
 /* fsnd_dtq */
+#define _KERNEL_SPT_FSND_DTQ_E_ID              _KERNEL_SPT_E_ID        (_KERNEL_CFG_FSND_DTQ_E_ID)
+#define _KERNEL_SPT_FSND_DTQ_E_NOEXS   _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_FSND_DTQ_E_NOEXS)
+#define _KERNEL_SPT_FSND_DTQ_E_ILUSE   _KERNEL_SPT_E_ILUSE     (_KERNEL_CFG_FSND_DTQ_E_ILUSE)
+#define _KERNEL_SPT_FSND_DTQ_E_NOSPT   _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_FSND_DTQ_E_NOSPT)
+
 /* ifsnd_dtq */
 /* rcv_dtq */
+#define _KERNEL_SPT_RCV_DTQ_E_CTX              _KERNEL_SPT_E_CTX       (_KERNEL_CFG_RCV_DTQ_E_CTX)
+#define _KERNEL_SPT_RCV_DTQ_E_ID               _KERNEL_SPT_E_ID        (_KERNEL_CFG_RCV_DTQ_E_ID)
+#define _KERNEL_SPT_RCV_DTQ_E_NOEXS            _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_RCV_DTQ_E_NOEXS)
+#define _KERNEL_SPT_RCV_DTQ_E_NOSPT            _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_RCV_DTQ_E_NOSPT)
+
 /* prcv_dtq */
+#define _KERNEL_SPT_PRCV_DTQ_E_CTX             _KERNEL_SPT_E_CTX       (_KERNEL_CFG_PRCV_DTQ_E_CTX)
+#define _KERNEL_SPT_PRCV_DTQ_E_ID              _KERNEL_SPT_E_ID        (_KERNEL_CFG_PRCV_DTQ_E_ID)
+#define _KERNEL_SPT_PRCV_DTQ_E_NOEXS   _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_PRCV_DTQ_E_NOEXS)
+#define _KERNEL_SPT_PRCV_DTQ_E_NOSPT   _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_PRCV_DTQ_E_NOSPT)
+
 /* trcv_dtq */
+
 /* ref_dtq */
 
 
+
 /* cre_mbx */
 #define _KERNEL_SPT_CRE_MBX_E_ID               _KERNEL_SPT_E_ID        (_KERNEL_CFG_CRE_MBX_E_ID)
 #define _KERNEL_SPT_CRE_MBX_E_RSATR    _KERNEL_SPT_E_RSATR     (_KERNEL_CFG_CRE_MBX_E_RSATR)
 
 /* snd_mbx */
 /* rcv_mbx */
+#define _KERNEL_SPT_RCV_MBX_E_ID               _KERNEL_SPT_E_ID        (_KERNEL_CFG_RCV_MBX_E_ID)
+#define _KERNEL_SPT_RCV_MBX_E_NOEXS            _KERNEL_SPT_E_NOEXS     (_KERNEL_CFG_RCV_MBX_E_NOEXS)
+#define _KERNEL_SPT_RCV_MBX_E_NOSPT            _KERNEL_SPT_E_NOSPT     (_KERNEL_CFG_RCV_MBX_E_NOSPT)
+
 /* prcv_mbx */
 /* trcv_mbx */
 /* ref_mbx */
index 898570a..534b897 100755 (executable)
@@ -24,7 +24,7 @@ ER sta_cyc(ID cycid)
 
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_STA_CYC_E_ID
+#if _KERNEL_SPT_STA_CYC_E_ID
        if ( !_KERNEL_CYC_CHECK_CYCID(cycid) )
        {
                return E_ID;    /* %jp{ID不正} */
@@ -34,7 +34,7 @@ ER sta_cyc(ID cycid)
        _KERNEL_ENTER_SVC();    /* %jp{サービスコール開始} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_STA_CYC_E_NOEXS
+#if _KERNEL_SPT_STA_CYC_E_NOEXS
        if ( !_KERNEL_CYC_CHECK_EXS(cycid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index 4873876..fe8acaf 100755 (executable)
@@ -23,7 +23,7 @@ ER stp_cyc(ID cycid)
 
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_STP_CYC_E_ID
+#if _KERNEL_SPT_STP_CYC_E_ID
        if ( !_KERNEL_CYC_CHECK_CYCID(cycid) )
        {
                return E_ID;    /* %jp{ID不正} */
@@ -33,7 +33,7 @@ ER stp_cyc(ID cycid)
        _KERNEL_ENTER_SVC();    /* %jp{サービスコール開始} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_STP_CYC_E_NOEXS
+#if _KERNEL_SPT_STP_CYC_E_NOEXS
        if ( !_KERNEL_CYC_CHECK_EXS(cycid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index b9b59d5..dd72940 100755 (executable)
@@ -34,7 +34,7 @@ ER fsnd_dtq(ID dtqid, VP_INT data)
        _KERNEL_DTQ_T_DTQCNT     dtqcnt;
        
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SIG_DTQ_E_ID
+#if _KERNEL_SPT_FSND_DTQ_E_ID
        if ( !_KERNEL_DTQ_CHECK_DTQID(dtqid) )
        {
                return E_ID;    /* %jp{不正ID番号}%en{Invalid ID number} */
@@ -44,7 +44,7 @@ ER fsnd_dtq(ID dtqid, VP_INT data)
        _KERNEL_ENTER_SVC();    /* %jp{サービスコールに入る}%en{enter service-call} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_FSND_DTQ_E_NOEXS
+#if _KERNEL_SPT_FSND_DTQ_E_NOEXS
        if ( !_KERNEL_DTQ_CHECK_EXS(dtqid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
@@ -59,7 +59,7 @@ ER fsnd_dtq(ID dtqid, VP_INT data)
        /* %jp{データキュー領域の容量取得} */
        dtqcnt = _KERNEL_DTQ_GET_DTQCNT(dtqcb_ro);
 
-#ifdef _KERNEL_SPT_FSND_DTQ_E_ILUSE
+#if _KERNEL_SPT_FSND_DTQ_E_ILUSE
        if ( dtqcnt == 0 )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index 836e573..b925e5d 100755 (executable)
@@ -16,7 +16,7 @@
 
 
 /* %jp{メモリ不足エラーチェックサポートの判定} */
-#if (_KERNEL_SPT_CRE_DTQ && _KERNEL_SPT_CRE_DTQ_E_NOMEM) || (_KERNEL_SPT_ADTQ_DTQ && _KERNEL_SPT_ACRE_DTQ_E_NOMEM)
+#if (_KERNEL_SPT_CRE_DTQ && _KERNEL_SPT_CRE_DTQ_E_NOMEM) || (_KERNEL_SPT_ACRE_DTQ && _KERNEL_SPT_ACRE_DTQ_E_NOMEM)
 #define _KERNEL_SPT_KCRE_DTQ_E_NOMEM   TRUE
 #else
 #define _KERNEL_SPT_KCRE_DTQ_E_NOMEM   FALSE
index 73c9904..5588beb 100755 (executable)
@@ -27,7 +27,7 @@ ER prcv_dtq(ID dtqid, VP_INT *p_data)
        ER               ercd;
 
        /* %jp{コンテキストチェック} */
-#if _KERNEL_SPT_WAI_SEM_E_CTX
+#if _KERNEL_SPT_PRCV_DTQ_E_CTX
        if ( _KERNEL_SYS_SNS_DPN() )
        {
                return E_CTX;                   /* %jp{コンテキストエラー}%en{Context error} */
@@ -35,7 +35,7 @@ ER prcv_dtq(ID dtqid, VP_INT *p_data)
 #endif
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_RCV_DTQ_E_ID
+#if _KERNEL_SPT_PRCV_DTQ_E_ID
        if ( !_KERNEL_DTQ_CHECK_DTQID(dtqid) )
        {
                return E_ID;    /* %jp{不正ID番号}%en{Invalid ID number} */
@@ -45,7 +45,7 @@ ER prcv_dtq(ID dtqid, VP_INT *p_data)
        _KERNEL_ENTER_SVC();    /* %jp{サービスコールに入る}%en{enter service-call} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_RCV_DTQ_E_NOEXS
+#if _KERNEL_SPT_PRCV_DTQ_E_NOEXS
        if ( !_KERNEL_DTQ_CHECK_EXS(dtqid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index aa2d268..d713654 100755 (executable)
@@ -27,7 +27,7 @@ ER rcv_dtq(ID dtqid, VP_INT *p_data)
        ER               ercd;
 
        /* %jp{コンテキストチェック} */
-#if _KERNEL_SPT_WAI_SEM_E_CTX
+#if _KERNEL_SPT_RCV_DTQ_E_CTX
        if ( _KERNEL_SYS_SNS_DPN() )
        {
                return E_CTX;                   /* %jp{コンテキストエラー}%en{Context error} */
@@ -35,7 +35,7 @@ ER rcv_dtq(ID dtqid, VP_INT *p_data)
 #endif
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_RCV_DTQ_E_ID
+#if _KERNEL_SPT_RCV_DTQ_E_ID
        if ( !_KERNEL_DTQ_CHECK_DTQID(dtqid) )
        {
                return E_ID;    /* %jp{不正ID番号}%en{Invalid ID number} */
@@ -45,7 +45,7 @@ ER rcv_dtq(ID dtqid, VP_INT *p_data)
        _KERNEL_ENTER_SVC();    /* %jp{サービスコールに入る}%en{enter service-call} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_RCV_DTQ_E_NOEXS
+#if _KERNEL_SPT_RCV_DTQ_E_NOEXS
        if ( !_KERNEL_DTQ_CHECK_EXS(dtqid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index f7ffc9f..77f39c3 100755 (executable)
@@ -33,7 +33,7 @@ ER snd_dtq(ID dtqid, VP_INT data)
        ER               ercd;
 
        /* %jp{コンテキストチェック} */
-#if _KERNEL_SPT_WAI_SEM_E_CTX
+#if _KERNEL_SPT_SND_DTQ_E_CTX
        if ( _KERNEL_SYS_SNS_DPN() )
        {
                return E_CTX;                   /* %jp{コンテキストエラー}%en{Context error} */
@@ -41,7 +41,7 @@ ER snd_dtq(ID dtqid, VP_INT data)
 #endif
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SND_DTQ_E_ID
+#if _KERNEL_SPT_SND_DTQ_E_ID
        if ( !_KERNEL_DTQ_CHECK_DTQID(dtqid) )
        {
                return E_ID;    /* %jp{不正ID番号}%en{Invalid ID number} */
@@ -51,7 +51,7 @@ ER snd_dtq(ID dtqid, VP_INT data)
        _KERNEL_ENTER_SVC();    /* %jp{サービスコールに入る}%en{enter service-call} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SND_DTQ_E_NOEXS
+#if _KERNEL_SPT_SND_DTQ_E_NOEXS
        if ( !_KERNEL_DTQ_CHECK_EXS(dtqid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index 92e1781..b99bbd9 100755 (executable)
@@ -79,7 +79,7 @@ ER _kernel_rcv_dtq(ID dtqid, TMO tmout)
        ER                   ercd;
 
        /* %jp{コンテキストチェック} */
-#if _KERNEL_SPT_KWAI_DTQ_E_CTX
+#if _KERNEL_SPT_KRCV_DTQ_E_CTX
        if ( tmout != TMO_POL && _KERNEL_SYS_SNS_DPN() )
        {
                return E_CTX;                   /* %jp{コンテキストエラー}%en{Context error} */
@@ -87,7 +87,7 @@ ER _kernel_rcv_dtq(ID dtqid, TMO tmout)
 #endif
 
        /* %jp{ID のチェック} */
-#if _KERNEL_SPT_KWAI_DTQ_E_ID
+#if _KERNEL_SPT_KRCV_DTQ_E_ID
        if ( !_KERNEL_DTQ_CHECK_DTQID(dtqid) )
        {
                return E_ID;    /* %jp{不正ID番号}%en{Invalid ID number} */
@@ -97,7 +97,7 @@ ER _kernel_rcv_dtq(ID dtqid, TMO tmout)
        _KERNEL_ENTER_SVC();            /* %jp{サービスコールに入る}%en{enter service-call} */
        
        /* %jp{オブジェクト存在チェック} */
-#if _KERNEL_SPT_KWAI_DTQ_E_NOEXS
+#if _KERNEL_SPT_KRCV_DTQ_E_NOEXS
        if ( !_KERNEL_DTQ_CHECK_EXS(dtqid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコールから出る}%en{leave service-call} */
@@ -189,7 +189,7 @@ ER _kernel_rcv_dtq(ID dtqid, TMO tmout)
                                _KERNEL_DSP_WAI_TSK(tskhdl);                                            /* %jp{待ち状態に設定} */
                                _KERNEL_DTQ_ADD_RQUE(dtqcb, dtqcb_ro, tskhdl);          /* %jp{待ち行列に追加} */
 
-#if _KERNEL_SPT_TWAI_DTQ
+#if _KERNEL_SPT_TRCV_DTQ
                                if ( tmout != TMO_FEVR )
                                {
                                        _KERNEL_DTQ_ADD_TOQ(tskhdl, tmout);                             /* %jp{タイムアウトキューに追加} */
index 04da7d9..ec0ac09 100755 (executable)
@@ -31,7 +31,7 @@ ER clr_flg(ID flgid, FLGPTN clrptn)
        _KERNEL_T_FLGCB *flgcb;
        
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_CLR_FLG_E_ID
+#if _KERNEL_SPT_CLR_FLG_E_ID
        if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
        {
                return E_ID;    /* %jp{ID不正} */
@@ -41,7 +41,7 @@ ER clr_flg(ID flgid, FLGPTN clrptn)
        _KERNEL_ENTER_SVC();    /* %jp{サービスコール開始} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_CLR_FLG_E_NOEXS
+#if _KERNEL_SPT_CLR_FLG_E_NOEXS
        if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index 441f3a2..6a43ed8 100755 (executable)
@@ -42,7 +42,7 @@ ER del_flg(ID flgid)
        
        /* %jp{存在チェック}%en{check object} */
 #if _KERNEL_SPT_DEL_FLG_E_NOEXS
-       if ( _KERNEL_FLG_CHECK_EXS(flgid) )
+       if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコールから出る}%en{leave service-call} */
                return E_NOEXS; 
index bbff91e..645f116 100755 (executable)
@@ -32,7 +32,7 @@ ER iset_flg(ID flgid, FLGPTN setptn)
        ER ercd;
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_ISET_FLG_E_ID
+#if _KERNEL_SPT_ISET_FLG_E_ID
        if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
        {
                return E_ID;            /* %jp{ID不正} */
@@ -75,7 +75,7 @@ void _kernel_dpc_set_flg(void)
        setptn = (FLGPTN)_KERNEL_SYS_RCV_DPC();
 
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_ISET_FLG_E_NOEXS
+#if _KERNEL_SPT_ISET_FLG_E_NOEXS
        if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
        {
                return;                 /* %jp{オブジェクト未生成} */
@@ -148,7 +148,7 @@ ER iset_flg(ID flgid, FLGPTN setptn)
 #else  /* _KERNEL_SPT_SET_FLG */
 
 
-#if _KERNEL_SPT_SET_IFLG_E_NOSPT
+#if _KERNEL_SPT_ISET_FLG_E_NOSPT
 
 /** %jp{イベントフラグ資源の返却}%en{Release Flgaphore Resource}
  * @param  flgid    %jp{イベントフラグ資源返却対象のイベントフラグのID番号}%en{ID number of the Eventflag to which resource is released}
index 2b59e34..3882098 100755 (executable)
@@ -59,7 +59,7 @@ ER pol_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn)
        ER                       ercd;
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_POL_FLG_E_ID
+#if _KERNEL_SPT_POL_FLG_E_ID
        if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
        {
                return E_ID;    /* %jp{ID不正} */
@@ -69,7 +69,7 @@ ER pol_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn)
        _KERNEL_ENTER_SVC();            /* %jp{サービスコール開始} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_POL_FLG_E_NOEXS
+#if _KERNEL_SPT_POL_FLG_E_NOEXS
        if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index 7b65858..06fca1f 100755 (executable)
@@ -37,7 +37,7 @@ ER set_flg(ID flgid, FLGPTN setptn)
        BOOL             wupflg = FALSE;
        
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SET_FLG_E_ID
+#if _KERNEL_SPT_SET_FLG_E_ID
        if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
        {
                return E_ID;    /* %jp{ID不正} */
@@ -47,7 +47,7 @@ ER set_flg(ID flgid, FLGPTN setptn)
        _KERNEL_ENTER_SVC();            /* %jp{サービスコール開始} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SET_FLG_E_NOEXS
+#if _KERNEL_SPT_SET_FLG_E_NOEXS
        if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index e7958d7..f0e7d74 100755 (executable)
@@ -48,7 +48,7 @@ ER twai_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn, TMO tmout)
 #endif
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_TWAI_FLG_E_ID
+#if _KERNEL_SPT_TWAI_FLG_E_ID
        if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
        {
                return E_ID;    /* %jp{ID不正} */
@@ -56,7 +56,7 @@ ER twai_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn, TMO tmout)
 #endif
        
        /* %jp{パラメータのチェック} */
-#ifdef _KERNEL_SPT_TWAI_FLG_E_PAR
+#if _KERNEL_SPT_TWAI_FLG_E_PAR
        if ( waiptn == 0 )
        {
                return E_PAR;   /* %jp{パラメータ不正} */
@@ -67,7 +67,7 @@ ER twai_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn, TMO tmout)
        _KERNEL_ENTER_SVC();            /* %jp{サービスコール開始} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_TWAI_FLG_E_NOEXS
+#if _KERNEL_SPT_TWAI_FLG_E_NOEXS
        if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index 4575b9e..3a4746f 100755 (executable)
@@ -71,7 +71,7 @@ ER wai_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn)
 #endif
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_WAI_FLG_E_ID
+#if _KERNEL_SPT_WAI_FLG_E_ID
        if ( !_KERNEL_FLG_CHECK_FLGID(flgid) )
        {
                return E_ID;    /* %jp{ID不正} */
@@ -79,7 +79,7 @@ ER wai_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn)
 #endif
 
        /* %jp{パラメータのチェック} */
-#ifdef _KERNEL_SPT_WAI_FLG_E_PAR
+#if _KERNEL_SPT_WAI_FLG_E_PAR
        if ( waiptn == 0 )
        {
                return E_PAR;   /* %jp{パラメータ不正} */
@@ -89,7 +89,7 @@ ER wai_flg(ID flgid, FLGPTN waiptn, MODE wfmode, FLGPTN *p_flgptn)
        _KERNEL_ENTER_SVC();            /* %jp{サービスコール開始} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_WAI_FLG_E_NOEXS
+#if _KERNEL_SPT_WAI_FLG_E_NOEXS
        if ( !_KERNEL_FLG_CHECK_EXS(flgid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index 6888e18..d23269f 100755 (executable)
@@ -25,7 +25,7 @@ ER rcv_mbx(ID mbxid, T_MSG **ppk_msg)
        ER                  ercd;
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SIG_MBX_E_ID
+#if _KERNEL_SPT_RCV_MBX_E_ID
        if ( !_KERNEL_MBX_CHECK_MBXID(mbxid) )
        {
                return E_ID;    /* %jp{不正ID番号}%en{Invalid ID number} */
@@ -35,7 +35,7 @@ ER rcv_mbx(ID mbxid, T_MSG **ppk_msg)
        _KERNEL_ENTER_SVC();    /* %jp{サービスコールに入る}%en{enter service-call} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SIG_MBX_E_NOEXS
+#if _KERNEL_SPT_RCV_MBX_E_NOEXS
        if ( !_KERNEL_MBX_CHECK_EXS(mbxid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index 0ae10c3..774c009 100755 (executable)
@@ -26,7 +26,7 @@ ER snd_mbx(ID mbxid, T_MSG *pk_msg)
        _KERNEL_T_TCB       *tcb;
        
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SND_MBX_E_ID
+#if _KERNEL_SPT_SND_MBX_E_ID
        if ( !_KERNEL_MBX_CHECK_MBXID(mbxid) )
        {
                return E_ID;    /* %jp{不正ID番号}%en{Invalid ID number} */
@@ -36,7 +36,7 @@ ER snd_mbx(ID mbxid, T_MSG *pk_msg)
        _KERNEL_ENTER_SVC();    /* %jp{サービスコールに入る}%en{enter service-call} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SND_MBX_E_NOEXS
+#if _KERNEL_SPT_SND_MBX_E_NOEXS
        if ( !_KERNEL_MBX_CHECK_EXS(mbxid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
index 39f2ce4..e9f0967 100755 (executable)
@@ -42,10 +42,10 @@ ER del_mtx(ID mtxid)
        
        /* %jp{存在チェック}%en{check object} */
 #if _KERNEL_SPT_DEL_MTX_E_NOEXS
-       if ( _KERNEL_MTX_CHECK_EXS(mtxid) )
+       if ( !_KERNEL_MTX_CHECK_EXS(mtxid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコールから出る}%en{leave service-call} */
-               return E_OBJ;                   /* %jp{オブジェクト状態エラー}%en{Object state error} */
+               return E_NOEXS;                 
        }
 #endif
        
index e4900f3..3cba58b 100755 (executable)
@@ -42,7 +42,7 @@ ER del_sem(ID semid)
        
        /* %jp{存在チェック}%en{check object} */
 #if _KERNEL_SPT_DEL_SEM_E_NOEXS
-       if ( _KERNEL_SEM_CHECK_EXS(semid) )
+       if ( !_KERNEL_SEM_CHECK_EXS(semid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコールから出る}%en{leave service-call} */
                return E_NOEXS;
index a52530c..c782b28 100755 (executable)
@@ -32,7 +32,7 @@ ER isig_sem(ID semid)
        ER ercd;
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_ISIG_SEM_E_ID
+#if _KERNEL_SPT_ISIG_SEM_E_ID
        if ( !_KERNEL_SEM_CHECK_SEMID(semid) )
        {
                return E_ID;    /* %jp{不正ID番号}%en{Invalid ID number} */
@@ -70,7 +70,7 @@ void _kernel_dpc_sig_sem(void)
        semid = (ID)_KERNEL_SYS_RCV_DPC();
 
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_ISIG_SEM_E_NOEXS
+#if _KERNEL_SPT_ISIG_SEM_E_NOEXS
        if ( !_KERNEL_SEM_CHECK_EXS(semid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
@@ -99,7 +99,7 @@ void _kernel_dpc_sig_sem(void)
                semcnt = _KERNEL_SEM_GET_SEMCNT(semcb);
 
                /* %jp{キューイングオーバーフローチェック} */
-#ifdef _KERNEL_SPT_SIG_SEM_E_QOVR
+#if _KERNEL_SPT_ISIG_SEM_E_QOVR
                {
                        _KERNEL_T_SEMCB_RO_PTR semcb_ro;
 
@@ -132,7 +132,7 @@ ER isig_sem(ID semid)
 #else  /* _KERNEL_SPT_SIG_SEM */
 
 
-#if _KERNEL_SPT_SIG_ISEM_E_NOSPT
+#if _KERNEL_SPT_ISIG_SEM_E_NOSPT
 
 /** %jp{セマフォ資源の返却}%en{Release Semaphore Resource}
  * @param  semid    %jp{セマフォ資源返却対象のセマフォのID番号}%en{ID number of the semaphore to which resource is released}
index d825df8..749e755 100755 (executable)
@@ -33,7 +33,7 @@ ER sig_sem(ID semid)
        _KERNEL_SEM_T_SEMCNT semcnt;
        
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_SIG_SEM_E_ID
+#if _KERNEL_SPT_SIG_SEM_E_ID
        if ( !_KERNEL_SEM_CHECK_SEMID(semid) )
        {
                return E_ID;    /* %jp{不正ID番号}%en{Invalid ID number} */
@@ -43,7 +43,7 @@ ER sig_sem(ID semid)
        _KERNEL_ENTER_SVC();    /* %jp{サービスコールに入る}%en{enter service-call} */
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SIG_SEM_E_NOEXS
+#if _KERNEL_SPT_SIG_SEM_E_NOEXS
        if ( !_KERNEL_SEM_CHECK_EXS(semid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
@@ -73,7 +73,7 @@ ER sig_sem(ID semid)
                semcnt = _KERNEL_SEM_GET_SEMCNT(semcb);
 
                /* %jp{キューイングオーバーフローチェック} */
-#ifdef _KERNEL_SPT_SIG_SEM_E_QOVR
+#if _KERNEL_SPT_SIG_SEM_E_QOVR
                {
                        _KERNEL_T_SEMCB_RO_PTR semcb_ro;
 
index fbb15d7..e54b9ab 100755 (executable)
@@ -45,7 +45,7 @@ ER can_wup(
                _KERNEL_ENTER_SVC();                    /* %jp{enter service-call}%jp{サービスコールに入る} */
                
                /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_CAN_WUP_E_NOEXS
+#if _KERNEL_SPT_CAN_WUP_E_NOEXS
                if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
                {
                        _KERNEL_LEAVE_SVC();            /* %jp{leave service-call}%jp{サービスコールを出る} */
index 029253b..373f99a 100755 (executable)
@@ -50,8 +50,8 @@ ER chg_pri(ID tskid, PRI tskpri)
                _KERNEL_ENTER_SVC();                    /* %jp{enter service-call}%jp{サービスコールに入る} */
                
                /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_REF_TSK_E_NOEXS
-               if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+#if _KERNEL_SPT_REF_TSK_E_NOEXS
+               if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
                {
                        _KERNEL_LEAVE_SVC();            /* %jp{leave service-call}%jp{サービスコールを出る} */
                        return E_NOEXS;                         /* %jp{オブジェクト未生成} */
index 340340d..ea40c2b 100755 (executable)
@@ -39,7 +39,7 @@ ER del_tsk(ID tskid)
        
        /* %jp{存在チェック}%en{check object} */
 #if _KERNEL_SPT_DEL_TSK_E_NOEXS
-       if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+       if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
        {
                _KERNEL_LEAVE_SVC();    /* %jp{サービスコールから出る}%en{leave service-call} */
                return E_NOEXS;
index 67b1917..9b92709 100755 (executable)
@@ -49,8 +49,8 @@ ER get_pri(ID tskid, PRI *p_tskpri)
                _KERNEL_ENTER_SVC();                    /* %jp{enter service-call}%jp{サービスコールに入る} */
                
                /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_REF_TSK_E_NOEXS
-               if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+#if _KERNEL_SPT_REF_TSK_E_NOEXS
+               if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
                {
                        _KERNEL_LEAVE_SVC();            /* %jp{leave service-call}%jp{サービスコールを出る} */
                        return E_NOEXS;                         /* %jp{オブジェクト未生成} */
index 75bb5cb..9f4c46b 100755 (executable)
@@ -30,14 +30,14 @@ ER iact_tsk(
        ER ercd;
 
        /* %jp{ID のチェック} */
-#ifdef _KERNEL_SPT_IACT_TSK_E_ID
+#if _KERNEL_SPT_IACT_TSK_E_ID
        if ( !_KERNEL_TSK_CHECK_TSKID(flgid) )
        {
                return E_ID;            /* %jp{ID不正} */
        }
 #endif
 
-#ifdef _KERNEL_SPT_IACT_TSK_E_CTX
+#if _KERNEL_SPT_IACT_TSK_E_CTX
        if ( !_KERNEL_SYS_SNS_CTX() )
        {
                return E_CTX;           /* %jp{コンテキスト不正} */
@@ -75,11 +75,11 @@ void _kernel_dpc_act_tsk(void)
        tskid = (ID)_KERNEL_SYS_RCV_DPC();
        
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_CFG_IACT_TSK_E_NOEXS
-       if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+#if _KERNEL_SPT_IACT_TSK_E_NOEXS
+       if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
        {
                _KERNEL_LEAVE_SVC();            /* %jp{leave service-call}%jp{サービスコールを出る} */
-               return E_NOEXS;                 /* %jp{オブジェクト未生成} */
+               return ;                                        /* %jp{オブジェクト未生成} */
        }
 #endif
 
index 271e8c1..41214d9 100755 (executable)
@@ -46,7 +46,7 @@ ER ref_tst(ID tskid, T_RTST *p_rtst)
                _KERNEL_ENTER_SVC();                    /* %jp{enter service-call}%jp{サービスコールに入る} */
                
                /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_REF_TST_E_NOEXS
+#if _KERNEL_SPT_REF_TST_E_NOEXS
                if ( _KERNEL_TSK_CHECK_EXS(tskid) )
                {
                        _KERNEL_LEAVE_SVC();            /* %jp{leave service-call}%jp{サービスコールを出る} */
index d220cf4..6ab310b 100755 (executable)
@@ -45,8 +45,8 @@ ER rel_wai(
                _KERNEL_ENTER_SVC();                    /* %jp{enter service-call}%jp{サービスコールに入る} */
                
                /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_REL_WAI_E_NOEXS
-               if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+#if _KERNEL_SPT_REL_WAI_E_NOEXS
+               if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
                {
                        _KERNEL_LEAVE_SVC();            /* %jp{leave service-call}%jp{サービスコールを出る} */
                        return E_NOEXS;                         /* %jp{オブジェクト未生成} */
index e492341..99e8919 100755 (executable)
@@ -35,8 +35,8 @@ ER rsm_tsk(
        _KERNEL_ENTER_SVC();                    /* %jp{enter service-call}%jp{サービスコールに入る} */
                
        /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SUS_TSK_E_NOEXS
-       if ( _KERNEL_TSK_CHECK_EXS(tskid) )
+#if _KERNEL_SPT_SUS_TSK_E_NOEXS
+       if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
        {
                _KERNEL_LEAVE_SVC();            /* %jp{leave service-call}%jp{サービスコールを出る} */
                return E_NOEXS;                         /* %jp{オブジェクト未生成} */
index d4a2ba7..e21ccaf 100755 (executable)
@@ -44,7 +44,7 @@ ER sus_tsk(
                _KERNEL_ENTER_SVC();            /* %jp{サービスコールに入る}%en{enter service-call} */
                
                /* %jp{オブジェクト存在チェック} */
-#ifdef _KERNEL_SPT_SUS_TSK_E_NOEXS
+#if _KERNEL_SPT_SUS_TSK_E_NOEXS
                if ( !_KERNEL_TSK_CHECK_EXS(tskid) )
                {
                        _KERNEL_LEAVE_SVC();    /* %jp{サービスコールを出る}%en{leave service-call} */
index 73654e9..0d3eefb 100755 (executable)
@@ -79,13 +79,13 @@ ER wup_tsk(
                        
                        wupcnt = _KERNEL_TSK_GET_WUPCNT(tcb);
 
-               #ifdef _KERNEL_SPT_WUP_TSK_E_QOVR
+#if _KERNEL_SPT_WUP_TSK_E_QOVR
                        if ( wupcnt >= _KERNEL_TMAX_WUPCNT )
                        {
                                _KERNEL_LEAVE_SVC();    /* %jp{サービスコール終了} */
                                return E_QOVR;
                        }
-               #endif
+#endif
                        
                        _KERNEL_TSK_SET_WUPCNT(tcb, wupcnt + 1);
                }