Index: uKadecot/trunk/ecnl_ssp/echonet_uip_task.c
===================================================================
--- uKadecot/trunk/ecnl_ssp/echonet_uip_task.c	(revision 108)
+++ uKadecot/trunk/ecnl_ssp/echonet_uip_task.c	(revision 152)
@@ -108,5 +108,5 @@
 	if (	a_rcv_pkt.t_esv->ecn_hdr.ehd1 != ECN_EDH1_ECHONET_LITE	/* ECHONET Lite規格	*/
 	||	a_rcv_pkt.t_esv->ecn_hdr.ehd2 != ECN_EDH2_FORMAT_1			/* 電文形式1		*/) {
-		ECN_DBG_PUT "[UDP ECHO SRV] illegal type (0x%02X,0x%02X)", a_rcv_pkt.t_esv->ecn_hdr.ehd1, a_rcv_pkt.t_esv->ecn_hdr.ehd2 ECN_DBG_END;
+		ECN_DBG_PUT("[UDP ECHO SRV] illegal type (0x%02X,0x%02X)", a_rcv_pkt.t_esv->ecn_hdr.ehd1, a_rcv_pkt.t_esv->ecn_hdr.ehd2);
 		return E_PAR;
 	}
@@ -118,10 +118,10 @@
 	a_ret = _ecn_fbs_cre(fa_len, &a_fbs_id);
 	if (a_ret != E_OK) {
-		ECN_DBG_PUT "[UDP ECHO SRV] _ecn_fbs_cre() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("[UDP ECHO SRV] _ecn_fbs_cre() result = %d:%s", a_ret, itron_strerror(a_ret));
 		return a_ret;
 	}
 	a_ret = _ecn_fbs_add_data_ex(a_fbs_id, buffer, fa_len);
 	if (a_ret) {
-		ECN_DBG_PUT "[UDP ECHO SRV] _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("[UDP ECHO SRV] _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
 		goto lb_except;
 	}
@@ -133,6 +133,6 @@
 	a_enod_id = udp_get_id((T_EDATA *)a_fbs_id.ptr, dst->ipaddr, dst->portno);
 	if (a_enod_id < 0 || tnum_enodadr <= a_enod_id) {
-		ECN_DBG_PUT "[UDP ECHO SRV] udp src(%s) echonet-node not found.",
-			ip2str(NULL, dst->ipaddr) ECN_DBG_END;
+		ECN_DBG_PUT("[UDP ECHO SRV] udp src(%s) echonet-node not found.",
+			ip2str(NULL, dst->ipaddr));
 	} else {
 		/* 送信元ECHONETノードを記録 */
@@ -144,5 +144,5 @@
 	a_ret = psnd_dtq(ecn_svc_mailboxid, (intptr_t)a_fbs_id.ptr);
 	if (a_ret != E_OK) {
-		ECN_DBG_PUT "[UDP ECHO SRV] psnd_dtq(ecn_svc_mailboxid) result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("[UDP ECHO SRV] psnd_dtq(ecn_svc_mailboxid) result = %d:%s", a_ret, itron_strerror(a_ret));
 		goto lb_except;
 	}
@@ -185,13 +185,13 @@
 
 	uip_gethostaddr(a_src);
-	ECN_DBG_PUT "[UDP TSK:%d] started, IP Address: %s ether_max_len: %u",
+	ECN_DBG_PUT("[UDP TSK:%d] started, IP Address: %s ether_max_len: %u",
 		ecn_udp_taskid,
 		ip2str(NULL, a_src),
-		UIP_BUFSIZE ECN_DBG_END;
+		UIP_BUFSIZE);
 	uip_ipaddr_copy(enodadrb_table[ENOD_LOCAL_ID].ipaddr, a_src);
 
 	UDP_CEPID = udp_acre_cep(&ccep);
 	if (UDP_CEPID == NULL) {
-		ECN_DBG_PUT "udp_acre_cep()" ECN_DBG_END;
+		ECN_DBG_PUT("udp_acre_cep()");
 		PT_EXIT(&pt);
 	}
@@ -200,5 +200,5 @@
 	a_ret = sta_cyc(ecn_udp_cychdrid);
 	if (a_ret != E_OK) {
-		ECN_DBG_PUT "sta_cyc() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("sta_cyc() result = %d:%s", a_ret, itron_strerror(a_ret));
 		PT_EXIT(&pt);
 	}
@@ -206,5 +206,5 @@
 	a_ret = act_tsk(ecn_svc_taskid);
 	if (a_ret != E_OK) {
-		ECN_DBG_PUT "act_tsk() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("act_tsk() result = %d:%s", a_ret, itron_strerror(a_ret));
 		PT_EXIT(&pt);
 	}
@@ -212,5 +212,5 @@
 	a_ret = get_tim(&a_now);
 	if (a_ret != E_OK) {
-		ECN_DBG_PUT "get_tim() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("get_tim() result = %d:%s", a_ret, itron_strerror(a_ret));
 		PT_EXIT(&pt);
 	}
@@ -226,5 +226,5 @@
 			|| ((a_ret = timer_expired(&timer) ? E_TMOUT : E_WBLK) == E_TMOUT)));
 		if ((a_ret != E_OK) && (a_ret != E_TMOUT)) {
-			ECN_DBG_PUT "trcv_dtq() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+			ECN_DBG_PUT("trcv_dtq() result = %d:%s", a_ret, itron_strerror(a_ret));
 			PT_EXIT(&pt);
 		}
@@ -232,5 +232,5 @@
 		a_ret2 = get_tim(&a_now);
 		if (a_ret2 != E_OK) {
-			ECN_DBG_PUT "get_tim() result = %d:%s", a_ret2, itron_strerror(a_ret2) ECN_DBG_END;
+			ECN_DBG_PUT("get_tim() result = %d:%s", a_ret2, itron_strerror(a_ret2));
 			PT_EXIT(&pt);
 		}
@@ -243,5 +243,5 @@
 			a_snd_len = _ecn_fbs_get_datalen(a_mdt.fbs_id);
 
-			ECN_DBG_PUT "[UDP TSK] trcv_dtq() mbx recv (%d byte)", a_snd_len ECN_DBG_END;
+			ECN_DBG_PUT("[UDP TSK] trcv_dtq() mbx recv (%d byte)", a_snd_len);
 
 			if (0 < a_snd_len) {
@@ -289,5 +289,5 @@
 	ret = _ecn_fbs_cre(1, &req);
 	if (ret != E_OK) {
-		ECN_DBG_PUT "_ecn_udp_cre_req_fbs() : _ecn_fbs_cre() result = %d:%s", ret, itron_strerror(ret) ECN_DBG_END;
+		ECN_DBG_PUT("_ecn_udp_cre_req_fbs() : _ecn_fbs_cre() result = %d:%s", ret, itron_strerror(ret));
 		return ret;
 	}
@@ -296,5 +296,5 @@
 	if (ret != E_OK) {
 		_ecn_fbs_del(req);
-		ECN_DBG_PUT "_ecn_udp_cre_req_fbs() : _ecn_fbs_add_data() result = %d:%s", ret, itron_strerror(ret) ECN_DBG_END;
+		ECN_DBG_PUT("_ecn_udp_cre_req_fbs() : _ecn_fbs_add_data() result = %d:%s", ret, itron_strerror(ret));
 		return ret;
 	}
@@ -318,5 +318,5 @@
 	ret = _ecn_fbs_cre(1, &res);
 	if (ret != E_OK) {
-		ECN_DBG_PUT "_ecn_udp_cre_res_fbs() : _ecn_fbs_cre() result = %d:%s", ret, itron_strerror(ret) ECN_DBG_END;
+		ECN_DBG_PUT("_ecn_udp_cre_res_fbs() : _ecn_fbs_cre() result = %d:%s", ret, itron_strerror(ret));
 		return ret;
 	}
@@ -325,5 +325,5 @@
 	if (ret != E_OK) {
 		_ecn_fbs_del(res);
-		ECN_DBG_PUT "_ecn_udp_cre_res_fbs() : _ecn_fbs_add_data() result = %d:%s", ret, itron_strerror(ret) ECN_DBG_END;
+		ECN_DBG_PUT("_ecn_udp_cre_res_fbs() : _ecn_fbs_add_data() result = %d:%s", ret, itron_strerror(ret));
 		return ret;
 	}
@@ -353,5 +353,5 @@
 	a_ret = _ecn_fbs_get_data(fbs_id, &cmd, 1, &len);
 	if (a_ret != E_OK) {
-		ECN_DBG_PUT "[UDP TSK] _ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("[UDP TSK] _ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret));
 		return;
 	}
@@ -368,5 +368,5 @@
 		a_ret = _ecn_fbs_get_data(fbs_id, &msg, sizeof(msg), &a_snd_len);
 		if (a_ret != E_OK) {
-			ECN_DBG_PUT "[UDP TSK] _ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+			ECN_DBG_PUT("[UDP TSK] _ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret));
 		}
 
@@ -384,5 +384,5 @@
 		if (a_ret != E_OK) {
 			_ecn_fbs_del(buf);
-			ECN_DBG_PUT "_ecn_int_msg() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+			ECN_DBG_PUT("_ecn_int_msg() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
 			return;
 		}
@@ -391,5 +391,5 @@
 		if (a_ret != E_OK) {
 			_ecn_fbs_del(buf);
-			ECN_DBG_PUT "_ecn_int_msg() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+			ECN_DBG_PUT("_ecn_int_msg() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
 			return;
 		}
@@ -398,5 +398,5 @@
 		if (a_ret != E_OK) {
 			_ecn_fbs_del(buf);
-			ECN_DBG_PUT "_ecn_int_msg() : psnd_dtq() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+			ECN_DBG_PUT("_ecn_int_msg() : psnd_dtq() result = %d:%s", a_ret, itron_strerror(a_ret));
 			return;
 		}
@@ -414,5 +414,5 @@
 	if (a_ret != E_OK) {
 		_ecn_fbs_del(buf);
-		ECN_DBG_PUT "_ecn_int_msg() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("_ecn_int_msg() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
 		return;
 	}
@@ -421,5 +421,5 @@
 	if (a_ret != E_OK) {
 		_ecn_fbs_del(buf);
-		ECN_DBG_PUT "_ecn_int_msg() : psnd_dtq() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("_ecn_int_msg() : psnd_dtq() result = %d:%s", a_ret, itron_strerror(a_ret));
 		return;
 	}
@@ -443,9 +443,9 @@
 	a_ret = udp_get_ip(&a_dst, fbs_id.ptr->hdr.target);
 	if (!a_ret) {
-		ECN_DBG_PUT "[UDP TSK] echonet-node 0x%02X-0x%02X-0x%02X → udp dest(%s)",
+		ECN_DBG_PUT("[UDP TSK] echonet-node 0x%02X-0x%02X-0x%02X → udp dest(%s)",
 			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx1,
 			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx2,
 			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx3,
-			ip2str(NULL, a_dst.ipaddr) ECN_DBG_END;
+			ip2str(NULL, a_dst.ipaddr));
 
 		/* fbsから出力領域にデータを抽出 */
@@ -453,10 +453,10 @@
 		a_ret = _ecn_fbs_get_data(fbs_id, buffer, sizeof(buffer), &a_snd_len);
 		if (a_ret != E_OK) {
-			ECN_DBG_PUT "[UDP TSK] _ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+			ECN_DBG_PUT("[UDP TSK] _ecn_fbs_get_data() result = %d:%s", a_ret, itron_strerror(a_ret));
 		}
 		else if(uip_ipaddr_cmp(a_dst.ipaddr, localhost)) {
 			/* 送信先が127.0.0.1 → mbxに転送 */
-			ECN_DBG_PUT "redirect ecn_udp_mailboxid → ecn_svc_mailboxid (esv:0x%02X)",
-				((T_EDATA *)fbs_id.ptr)->hdr.edata.esv ECN_DBG_END;
+			ECN_DBG_PUT("redirect ecn_udp_mailboxid → ecn_svc_mailboxid (esv:0x%02X)",
+				((T_EDATA *)fbs_id.ptr)->hdr.edata.esv);
 
 			a_ret = _ecn_udp2mbx((const uint8_t *)buffer, a_snd_len, &a_dst);
@@ -466,6 +466,6 @@
 		}
 		else {
-			ECN_DBG_PUT "[UDP TSK] udp_snd_dat() to:%s %ubyte(s)",
-				ip2str(NULL, a_dst.ipaddr), a_snd_len ECN_DBG_END;
+			ECN_DBG_PUT("[UDP TSK] udp_snd_dat() to:%s %ubyte(s)",
+				ip2str(NULL, a_dst.ipaddr), a_snd_len);
 #ifdef ECN_DBG_PUT_ENA
 			_ecn_dbg_bindmp((const uint8_t *)buffer, a_snd_len);
@@ -474,5 +474,5 @@
 			a_ret = udp_snd_dat(UDP_CEPID, &a_dst, buffer, a_snd_len);
 			if (a_ret < 0) {
-				ECN_DBG_PUT "[UDP TSK] send, error: %s", itron_strerror(a_ret) ECN_DBG_END;
+				ECN_DBG_PUT("[UDP TSK] send, error: %s", itron_strerror(a_ret));
 			}
 		}
@@ -480,11 +480,11 @@
 		/* データが長すぎて1パケットに収まらなかった場合 */
 		if (_ecn_fbs_exist_data(fbs_id)) {
-			ECN_DBG_PUT "[UDP TSK] send, data so long: %dbyte(s)", _ecn_fbs_get_datalen(fbs_id) ECN_DBG_END;
+			ECN_DBG_PUT("[UDP TSK] send, data so long: %dbyte(s)", _ecn_fbs_get_datalen(fbs_id));
 		}
 	} else {
-		ECN_DBG_PUT "[UDP TSK] echonet-node 0x%02X-0x%02X-0x%02X not found.",
+		ECN_DBG_PUT("[UDP TSK] echonet-node 0x%02X-0x%02X-0x%02X not found.",
 			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx1,
 			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx2,
-			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx3 ECN_DBG_END;
+			((T_EDATA *)fbs_id.ptr)->hdr.edata.deoj.eojx3);
 	}
 }
@@ -505,5 +505,5 @@
 	PT_BEGIN(&s.pt);
 
-	/* ECN_CAP_PUT "[UDP ECHO SRV] callback_nblk_udp() recv: %u", *(int *)p_parblk ECN_CAP_END; */
+	/* ECN_CAP_PUT("[UDP ECHO SRV] callback_nblk_udp() recv: %u", *(int *)p_parblk); */
 	memset(buffer, 0, sizeof(buffer));
 
@@ -519,6 +519,6 @@
 	}
 #endif
-	ECN_CAP_PUT "[UDP ECHO SRV] recv, addr: %s:%d, len: %d, msg: '%s'",
-			ip2str(NULL, dst.ipaddr), dst.portno, a_len, buffer ECN_CAP_END;
+	ECN_CAP_PUT("[UDP ECHO SRV] recv, addr: %s:%d, len: %d, msg: '%s'",
+			ip2str(NULL, dst.ipaddr), dst.portno, a_len, buffer);
 	if ((int)sizeof(buffer) <= a_len)
 		a_len = (int)sizeof(buffer) - 1;
@@ -583,5 +583,5 @@
 			break;
 		}
-		ECN_DBG_PUT "is_match(): ecn_itr_nxt() result: epc=0x%02X, pdc=%d", epc, pdc ECN_DBG_END;
+		ECN_DBG_PUT("is_match(): ecn_itr_nxt() result: epc=0x%02X, pdc=%d", epc, pdc);
 		/* インスタンスリスト通知または自ノードインスタンスリストＳ以外は除外 */
 		if ((epc != 0xD5) && (epc != 0xD6)) {
@@ -641,6 +641,6 @@
 			continue;
 
-		ECN_CAP_PUT "udp_get_id(): ip-found remote(%d) = %s",
-			i - ENOD_REMOTE_ID, ip2str(NULL, ipaddr) ECN_CAP_END;
+		ECN_CAP_PUT("udp_get_id(): ip-found remote(%d) = %s",
+			i - ENOD_REMOTE_ID, ip2str(NULL, ipaddr));
 		return (ECN_ENOD_ID)i;
 	}
@@ -660,6 +660,6 @@
 		uip_ipaddr_copy(ea->ipaddr, ipaddr);
 
-		ECN_CAP_PUT "udp_get_id(): enod-found remote(%d) = %s",
-			i - ENOD_REMOTE_ID, ip2str(NULL, ipaddr) ECN_CAP_END;
+		ECN_CAP_PUT("udp_get_id(): enod-found remote(%d) = %s",
+			i - ENOD_REMOTE_ID, ip2str(NULL, ipaddr));
 		return (ECN_ENOD_ID)i;
 	}
@@ -673,6 +673,6 @@
 		uip_ipaddr_copy(ea->ipaddr, ipaddr);
 
-		ECN_CAP_PUT "udp_get_id(): empty-found remote(%d) = %s",
-			i - ENOD_REMOTE_ID, ip2str(NULL, ipaddr) ECN_CAP_END;
+		ECN_CAP_PUT("udp_get_id(): empty-found remote(%d) = %s",
+			i - ENOD_REMOTE_ID, ip2str(NULL, ipaddr));
 		return (ECN_ENOD_ID)i;
 	}
@@ -732,5 +732,5 @@
 	if (a_ret != E_OK) {
 		_ecn_fbs_del(req);
-		ECN_DBG_PUT "ecn_udp_get_ipaddr() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("ecn_udp_get_ipaddr() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
 		return a_ret;
 	}
@@ -739,5 +739,5 @@
 	if (a_ret != E_OK) {
 		_ecn_fbs_del(req);
-		ECN_DBG_PUT "ecn_udp_get_ipaddr() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("ecn_udp_get_ipaddr() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
 		return a_ret;
 	}
@@ -746,5 +746,5 @@
 	if (a_ret != E_OK) {
 		_ecn_fbs_del(req);
-		ECN_DBG_PUT "ecn_udp_get_ipaddr() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret) ECN_DBG_END;
+		ECN_DBG_PUT("ecn_udp_get_ipaddr() : _ecn_fbs_add_data_ex() result = %d:%s", a_ret, itron_strerror(a_ret));
 		return a_ret;
 	}
