Formatting and CLeaning nlsr_ndn.c
diff --git a/macbook.conf b/macbook.conf
index 6923325..cba7a1d 100644
--- a/macbook.conf
+++ b/macbook.conf
@@ -1,9 +1,9 @@
 #----configuration file for macbook----------
 #
 router-name /ndn/memphis.edu/netlab/macbook
-ccnneighbor /ndn/memphis.edu/cs/maia
-ccnneighbor /ndn/memphis.edu/cs/mira
-ccnneighbor /ndn/memphis.edu/cs/castor
+#ccnneighbor /ndn/memphis.edu/cs/maia
+#ccnneighbor /ndn/memphis.edu/cs/mira
+#ccnneighbor /ndn/memphis.edu/cs/castor
 ccnneighbor /ndn/memphis.edu/cs/pollux 141.225.11.132
 ccnname /ndn/memphis.edu/macbook/patterson
 ccnname /ndn/memphis.edu/macbook/houston/
diff --git a/nlsr_ndn.c b/nlsr_ndn.c
index c0e5db8..e79ca87 100644
--- a/nlsr_ndn.c
+++ b/nlsr_ndn.c
@@ -24,6 +24,9 @@
 #include "nlsr_lsdb.h"
 #include "utility.h"
 
+/**
+* add lifetime in second to a interest template
+*/
 int
 appendLifetime(struct ccn_charbuf *cb, int lifetime) 
 {
@@ -37,13 +40,18 @@
 		buf[pos] = dreck & 255;
 		dreck = dreck >> 8;
 	}
-	res |= ccnb_append_tagged_blob(cb, CCN_DTAG_InterestLifetime, buf+pos, sizeof(buf)-pos);
+	res |= ccnb_append_tagged_blob(cb, CCN_DTAG_InterestLifetime, buf+pos, 
+															sizeof(buf)-pos);
 	return res;
 }
 
+/**
+* get neighbor name prefix from interest/content name and put into nbr
+*/
 
 void 
-get_nbr(struct name_prefix *nbr,struct ccn_closure *selfp, struct ccn_upcall_info *info)
+get_nbr(struct name_prefix *nbr,struct ccn_closure *selfp, 
+													struct ccn_upcall_info *info)
 {
 	if ( nlsr->debugging )
 		printf("get_nbr called\n");
@@ -70,7 +78,8 @@
 	size_t comp_size;
 	for(i=0;i<nlsr_position;i++)
 	{
-		res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,i,&comp_ptr1, &comp_size);
+		res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,i,&
+														comp_ptr1, &comp_size);
 		len+=1;
 		len+=(int)comp_size;	
 	}
@@ -81,7 +90,8 @@
 
 	for(i=0; i<nlsr_position;i++)
 	{
-		res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,i,&comp_ptr1, &comp_size);
+		res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,i,
+														&comp_ptr1, &comp_size);
 		memcpy(neighbor+strlen(neighbor),"/",1);
 		memcpy(neighbor+strlen(neighbor),(char *)comp_ptr1,strlen((char *)comp_ptr1));
 
@@ -94,17 +104,19 @@
 	if ( nlsr->debugging )
 		printf("Neighbor: %s Length: %d\n",nbr->name,nbr->length);
 	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Neighbor: %s Length: %d\n",nbr->name,nbr->length);
-
-	
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Neighbor: %s Length: %d\n",
+														nbr->name,nbr->length);
 
 }
 
-void 
-get_lsa_identifier(struct name_prefix *lsaId,struct ccn_closure *selfp, struct ccn_upcall_info *info, int offset)
-{
+/**
+*	Retrieve LSA identifier from content name
+*/
 
-	//printf("get_lsa_identifier called\n");
+void 
+get_lsa_identifier(struct name_prefix *lsaId,struct ccn_closure *selfp, 
+									struct ccn_upcall_info *info, int offset)
+{
 
 	if ( nlsr->debugging )
 		printf("get_lsa_identifier called\n");
@@ -131,7 +143,8 @@
 	size_t comp_size;
 	for(i=nlsr_position+3+offset;i<info->interest_comps->n-1;i++)
 	{
-		res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,i,&comp_ptr1, &comp_size);
+		res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,i,
+														&comp_ptr1, &comp_size);
 		len+=1;
 		len+=(int)comp_size;	
 	}
@@ -142,7 +155,8 @@
 
 	for(i=nlsr_position+3+offset; i<info->interest_comps->n-1;i++)
 	{
-		res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,i,&comp_ptr1, &comp_size);
+		res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,i,
+														&comp_ptr1, &comp_size);
 		memcpy(neighbor+strlen(neighbor),"/",1);
 		memcpy(neighbor+strlen(neighbor),(char *)comp_ptr1,strlen((char *)comp_ptr1));
 
@@ -156,52 +170,17 @@
 	if ( nlsr->debugging )
 		printf("LSA Identifier: %s Length: %d\n",lsaId->name,lsaId->length-1);
 	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"LSA Identifier: %s Length: %d\n",lsaId->name,lsaId->length-1);
-
-}
-
-int 
-get_ls_type(struct ccn_closure *selfp, struct ccn_upcall_info *info)
-{
-	int res,i;
-	int nlsr_position=0;
-	int name_comps=(int)info->interest_comps->n;
-
-	int ret=0;
-
-	for(i=0;i<name_comps;i++)
-	{
-		res=ccn_name_comp_strcmp(info->interest_ccnb,info->interest_comps,i,"nlsr");
-		if( res == 0)
-		{
-			nlsr_position=i;
-			break;
-		}	
-	}
-
-
-	const unsigned char *comp_ptr1;
-	size_t comp_size;
-	res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,nlsr_position+2,&comp_ptr1, &comp_size);
-
-	ret=atoi((char *)comp_ptr1);
-
-	return ret;	
-
-}
-
-void 
-get_lsdb_version(char *lsdb_version,struct ccn_closure *selfp, struct ccn_upcall_info *info )
-{
-	const unsigned char *comp_ptr1;
-	size_t comp_size;
-	ccn_name_comp_get(info->content_ccnb, info->content_comps,info->content_comps->n-2,&comp_ptr1, &comp_size);
-	memcpy(lsdb_version,(char *)comp_ptr1,(int)comp_size);
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"LSA Identifier: %s Length: "
+											"%d\n",lsaId->name,lsaId->length-1);
 
 }
 
 
-/* Call back function registered in ccnd to get all interest coming to NLSR application */
+
+/** 
+* Call back function registered in ccnd to get all interest coming to NLSR 
+* application 
+*/
 
 enum ccn_upcall_res 
 incoming_interest(struct ccn_closure *selfp,
@@ -244,7 +223,9 @@
     return CCN_UPCALL_RESULT_OK;
 }
 
-/* Function for processing incoming interest and reply with content/NACK content */
+/**
+* Function for processing incoming interest and reply with content/NACK content 
+*/
 
 void 
 process_incoming_interest(struct ccn_closure *selfp, struct ccn_upcall_info *info)
@@ -270,7 +251,8 @@
 		}	
 	}
 
-	res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,nlsr_position+1,&comp_ptr1, &comp_size);
+	res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,nlsr_position+1,
+								&comp_ptr1, &comp_size);
 
 
 	if(!strcmp((char *)comp_ptr1,"info"))
@@ -280,6 +262,10 @@
 
 }
 
+/**
+*
+*/
+
 void 
 process_incoming_interest_info(struct ccn_closure *selfp, struct ccn_upcall_info *info)
 {
@@ -290,7 +276,8 @@
 	}
 	if ( nlsr->detailed_logging )
 	{
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_interest_info called \n");
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_interest_info"
+				" called \n");
 		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending Info Content back.....\n");
 	}
 	
@@ -300,7 +287,8 @@
     	struct ccn_charbuf *name=ccn_charbuf_create();
     	
 
-	res=ccn_charbuf_append(name, info->interest_ccnb + info->pi->offset[CCN_PI_B_Name],info->pi->offset[CCN_PI_E_Name] - info->pi->offset[CCN_PI_B_Name]);
+	res=ccn_charbuf_append(name, info->interest_ccnb + info->pi->offset[CCN_PI_B_Name],
+			info->pi->offset[CCN_PI_E_Name] - info->pi->offset[CCN_PI_B_Name]);
 	if (res >= 0)
 	{
 		
@@ -315,6 +303,7 @@
 
 		struct ccn_signing_params sp=CCN_SIGNING_PARAMS_INIT;
 		sp.template_ccnb=ccn_charbuf_create();		
+				
 		ccn_charbuf_append_tt(sp.template_ccnb, CCN_DTAG_SignedInfo, CCN_DTAG);
 		ccn_charbuf_append_tt(sp.template_ccnb, CCN_DTAG_KeyLocator, CCN_DTAG);
 		ccn_charbuf_append_tt(sp.template_ccnb, CCN_DTAG_KeyName, CCN_DTAG);
@@ -328,11 +317,12 @@
 		sp.type = CCN_CONTENT_KEY;
 		sp.freshness = 10;
 		
-		//ccn_charbuf_append_tt(sp.template_ccnb,CCN_DTAG_SignedInfo, CCN_DTAG);
-		//ccnb_tagged_putf(sp.template_ccnb, CCN_DTAG_FreshnessSeconds, "%ld", 10);
-       	 	//sp.sp_flags |= CCN_SP_TEMPL_FRESHNESS;
-		//ccn_charbuf_append_closer(sp.template_ccnb);
-
+		
+		/*ccn_charbuf_append_tt(sp.template_ccnb,CCN_DTAG_SignedInfo, CCN_DTAG);
+		ccnb_tagged_putf(sp.template_ccnb, CCN_DTAG_FreshnessSeconds, "%ld", 10);
+       	 	sp.sp_flags |= CCN_SP_TEMPL_FRESHNESS;
+		ccn_charbuf_append_closer(sp.template_ccnb);
+		*/
 
 		char *raw_data=(char *)malloc(20);
 		memset(raw_data,0,20);
@@ -344,7 +334,8 @@
 			if ( nlsr->debugging )
 				printf("Signing info Content is successful \n");
 			if ( nlsr->detailed_logging )
-				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Signing info Content is successful \n");
+				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Signing info Content"
+									" is successful \n");
 
 		}
     		res=ccn_put(nlsr->ccn,data->buf,data->length);		
@@ -353,7 +344,8 @@
 			if ( nlsr->debugging )
 				printf("Sending Info Content is successful \n");
 			if ( nlsr->detailed_logging )
-				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending info Content is successful \n");
+				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending info Content"
+									  " is successful \n");
 		}
 		
 
@@ -362,14 +354,15 @@
 		get_lsa_identifier(nbr,selfp,info,-1);
 
 		if ( nlsr->debugging )
-			printf("Neighbor : %s Length : %d Status : %d\n",nbr->name,nbr->length,get_adjacent_status(nbr));
+			printf("Neighbor : %s Length : %d Status : %d\n",nbr->name,nbr->length,
+									get_adjacent_status(nbr));
 		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Neighbor : %s Length : %d Status : %d\n",nbr->name,nbr->length,get_adjacent_status(nbr));		
-
-		//printf("Neighbor : %s Length : %d Status : %d\n",nbr->name,nbr->length,get_adjacent_status(nbr));
+			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Neighbor : %s Length : %d"
+				" Status : %d\n",nbr->name,nbr->length,get_adjacent_status(nbr));		
 
 
-		if( get_adjacent_status(nbr) == 0 && get_timed_out_number(nbr)>=nlsr->interest_retry )
+		if( get_adjacent_status(nbr) == 0 && get_timed_out_number(nbr) >= 
+														nlsr->interest_retry )
 		{
 			update_adjacent_timed_out_zero_to_adl(nbr);
 			send_info_interest_to_neighbor(nbr);
@@ -423,7 +416,8 @@
 		if ( nlsr->debugging )
 			printf("Interest Timed Out Received for Name:  "); 
 		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Interest Timed Out Received for Name: ");
+			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Interest Timed Out Receiv"
+															"ed for Name: ");
 		
 		struct ccn_charbuf*ito;
 		ito=ccn_charbuf_create();
@@ -442,9 +436,10 @@
         default:
             fprintf(stderr, "Unexpected response of kind %d\n", kind);
 	    if ( nlsr->debugging )
-		printf("Unexpected response of kind %d\n", kind);
+			printf("Unexpected response of kind %d\n", kind);
 	    if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Unexpected response of kind %d\n", kind);
+			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Unexpected response of "
+															"kind %d\n", kind);
 	    break;
     }
     
@@ -478,7 +473,8 @@
 		}	
 	}
 
-	res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,nlsr_position+1,&comp_ptr1, &comp_size);
+	res=ccn_name_comp_get(info->interest_ccnb, info->interest_comps,
+										nlsr_position+1,&comp_ptr1, &comp_size);
 
 
 	if(!strcmp((char *)comp_ptr1,"info"))
@@ -490,20 +486,24 @@
 
 
 void 
-process_incoming_content_info(struct ccn_closure *selfp, struct ccn_upcall_info* info)
+process_incoming_content_info(struct ccn_closure *selfp, 
+												struct ccn_upcall_info* info)
 {
 	if ( nlsr->debugging )
 		printf("process_incoming_content_info called \n");
 	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_content_info called \n");
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_content_info"
+																" called \n");
 
 	struct name_prefix *nbr=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
 	get_nbr(nbr,selfp,info);
 
 	if ( nlsr->debugging )
-		printf("Info Content Received For Neighbor: %s Length:%d\n",nbr->name,nbr->length);
+		printf("Info Content Received For Neighbor: %s Length:%d\n",nbr->name,
+																nbr->length);
 	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Info Content Received For Neighbor: %s Length:%d\n",nbr->name,nbr->length);
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Info Content Received For Nei"
+								"ghbor: %s Length:%d\n",nbr->name,nbr->length);
 
 
 	if ( contain_key_name(info->content_ccnb, info->pco) == 1)
@@ -532,8 +532,10 @@
 		if ( nlsr->debugging )
 			printf("Scheduling Build and Install Adj LSA...\n");
 		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Scheduling Build and Install Adj LSA...\n");
-		nlsr->event_build_adj_lsa = ccn_schedule_event(nlsr->sched, 100000, &build_and_install_adj_lsa, NULL, 0);
+			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Scheduling Build and Inst"
+															"all Adj LSA...\n");
+		nlsr->event_build_adj_lsa = ccn_schedule_event(nlsr->sched, 100000, 
+										&build_and_install_adj_lsa, NULL, 0);
 		nlsr->is_build_adj_lsa_sheduled=1;		
 	}
 	else
@@ -541,7 +543,8 @@
 		if ( nlsr->debugging )
 			printf("Build and Install Adj LSA already scheduled\n");
 		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Build and Install Adj LSA already scheduled\n");
+			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Build and Install Adj LSA"
+														" already scheduled\n");
 	}
 
 
@@ -554,14 +557,16 @@
 
 
 void
-process_incoming_timed_out_interest(struct ccn_closure* selfp, struct ccn_upcall_info* info)
+process_incoming_timed_out_interest(struct ccn_closure* selfp, 
+												struct ccn_upcall_info* info)
 {
 	
 
 	if ( nlsr->debugging )
 		printf("process_incoming_timed_out_interest called \n");
 	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_timed_out_interest called \n");
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_timed_out_int"
+															"erest called \n");
 
 	int res,i;
 	int nlsr_position=0;
@@ -577,28 +582,33 @@
 		}	
 	}
 
-	if(ccn_name_comp_strcmp(info->interest_ccnb,info->interest_comps,nlsr_position+1,"info") == 0)
+	if(ccn_name_comp_strcmp(info->interest_ccnb,info->interest_comps,
+												nlsr_position+1,"info") == 0)
 	{
 		process_incoming_timed_out_interest_info(selfp,info);
 	}
 }
 
 void
-process_incoming_timed_out_interest_info(struct ccn_closure* selfp, struct ccn_upcall_info* info)
+process_incoming_timed_out_interest_info(struct ccn_closure* selfp, struct 
+														ccn_upcall_info* info)
 {
 	
 	if ( nlsr->debugging )
 		printf("process_incoming_timed_out_interest_info called \n");
 	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_timed_out_interest_info called \n");
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"process_incoming_timed_out_int"
+														"erest_info called \n");
 
 	struct name_prefix *nbr=(struct name_prefix *)malloc(sizeof(struct name_prefix ));
 	get_nbr(nbr,selfp,info);
 
 	if ( nlsr->debugging )
-		printf("Info Interest Timed Out for for Neighbor: %s Length:%d\n",nbr->name,nbr->length);
+		printf("Info Interest Timed Out for for Neighbor: %s Length:%d\n",
+														nbr->name,nbr->length);
 	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Info Interest Timed Out for for Neighbor: %s Length:%d\n",nbr->name,nbr->length);
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Info Interest Timed Out for"
+							" Neighbor: %s Length:%d\n",nbr->name,nbr->length);
 	
 
 
@@ -607,9 +617,11 @@
 	int timed_out=get_timed_out_number(nbr);
 
 	if ( nlsr->debugging )
-		printf("Neighbor: %s Info Interest Timed Out: %d times\n",nbr->name,timed_out);
+		printf("Neighbor: %s Info Interest Timed Out: %d times\n",nbr->name,
+																	timed_out);
 	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Neighbor: %s Info Interest Timed Out: %d times\n",nbr->name,timed_out);
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"Neighbor: %s Info Interest "
+									"Timed Out: %d times\n",nbr->name,timed_out);
 
 
 	if(timed_out<nlsr->interest_retry && timed_out>0) // use configured variables 
@@ -621,7 +633,8 @@
 		update_adjacent_status_to_adl(nbr,NBR_DOWN);
 		if(!nlsr->is_build_adj_lsa_sheduled)
 		{
-			nlsr->event_build_adj_lsa = ccn_schedule_event(nlsr->sched, 1000, &build_and_install_adj_lsa, NULL, 0);
+			nlsr->event_build_adj_lsa = ccn_schedule_event(nlsr->sched, 1000, 
+										   &build_and_install_adj_lsa, NULL, 0);
 			nlsr->is_build_adj_lsa_sheduled=1;		
 		}
 	}
@@ -633,7 +646,8 @@
 
 
 int
-send_info_interest(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags)
+send_info_interest(struct ccn_schedule *sched, void *clienth, 
+									struct ccn_scheduled_event *ev, int flags)
 {
 	if(flags == CCN_SCHEDULE_CANCEL)
 	{
@@ -671,7 +685,8 @@
 
 	 nlsr_unlock();
 
-	nlsr->event = ccn_schedule_event(nlsr->sched, 60000000, &send_info_interest, NULL, 0);
+	nlsr->event = ccn_schedule_event(nlsr->sched, 60000000, &send_info_interest,
+																	 NULL, 0);
 
 	return 0;
 }
@@ -683,7 +698,8 @@
 	if ( nlsr->debugging )
 		printf("send_info_interest_to_neighbor called \n");
 	if ( nlsr->detailed_logging )
-		writeLogg(__FILE__,__FUNCTION__,__LINE__,"send_info_interest_to_neighbor called \n");
+		writeLogg(__FILE__,__FUNCTION__,__LINE__,"send_info_interest_to_neighbor"
+																" called \n");
 
 
 	int res;
@@ -699,8 +715,10 @@
 	struct ccn_charbuf *name;	
 	name=ccn_charbuf_create();
 
-	char *int_name=(char *)malloc(strlen(nbr->name)+1+strlen(nlsr_str)+1+strlen(info_str)+strlen(nlsr->router_name)+1);
-	memset(int_name,0,strlen(nbr->name)+1+strlen(nlsr_str)+1+strlen(info_str)+strlen(nlsr->router_name)+1);
+	char *int_name=(char *)malloc(strlen(nbr->name)+1+strlen(nlsr_str)+1+
+						strlen(info_str)+strlen(nlsr->router_name)+1);
+	memset(int_name,0,strlen(nbr->name)+1+strlen(nlsr_str)+1+strlen(info_str)+
+												strlen(nlsr->router_name)+1);
 	memcpy(int_name+strlen(int_name),nbr->name,strlen(nbr->name));
 	memcpy(int_name+strlen(int_name),"/",1);
 	memcpy(int_name+strlen(int_name),nlsr_str,strlen(nlsr_str));
@@ -723,7 +741,8 @@
 		ccn_charbuf_append_tt(templ, CCN_DTAG_Scope, CCN_DTAG);
 		ccn_charbuf_append_tt(templ, 1, CCN_UDATA);
 		/* Adding InterestLifeTime and InterestScope filter done */		
-		ccn_charbuf_append(templ, "2", 1); //scope of interest: 2 (not further than next host)
+		ccn_charbuf_append(templ, "2", 1); //scope of interest: 2 
+											//(not further than next host)
 		ccn_charbuf_append_closer(templ); /* </Scope> */
 
 		appendLifetime(templ,nlsr->interest_resend_time);
@@ -733,9 +752,11 @@
 		
 	
 		if ( nlsr->debugging )
-			printf("Sending info interest on name prefix : %s through Face:%u\n",int_name,face_id);
+			printf("Sending info interest on name prefix : %s through Face:%u\n"
+															,int_name,face_id);
 		if ( nlsr->detailed_logging )
-			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending info interest on name prefix : %s through Face:%u\n",int_name,face_id);
+			writeLogg(__FILE__,__FUNCTION__,__LINE__,"Sending info interest on"
+						 "name prefix : %s through Face:%u\n",int_name,face_id);
 
 		res=ccn_express_interest(nlsr->ccn,name,&(nlsr->in_content),templ);
 
@@ -744,7 +765,8 @@
 			if ( nlsr->debugging )
 				printf("Info interest sending Successfull .... \n");
 			if ( nlsr->detailed_logging )
-				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Info interest sending Successfull .... \n");
+				writeLogg(__FILE__,__FUNCTION__,__LINE__,"Info" 
+					"interest sending Successfull .... \n");
 		}	
 		ccn_charbuf_destroy(&templ);
 	}
@@ -760,7 +782,10 @@
 
 	struct ccn_buf_decoder decoder;
 	struct ccn_buf_decoder *d;
-	d = ccn_buf_decoder_start(&decoder, ccnb + pco->offset[CCN_PCO_B_Key_Certificate_KeyName], pco->offset[CCN_PCO_E_Key_Certificate_KeyName] - pco->offset[CCN_PCO_B_Key_Certificate_KeyName]);
+	d = ccn_buf_decoder_start(&decoder, ccnb + 
+		pco->offset[CCN_PCO_B_Key_Certificate_KeyName], 
+		pco->offset[CCN_PCO_E_Key_Certificate_KeyName] - 
+		pco->offset[CCN_PCO_B_Key_Certificate_KeyName]);
 	if (ccn_buf_match_dtag(d, CCN_DTAG_KeyName))
 		return 1;
 
@@ -771,7 +796,8 @@
 get_key_name(const unsigned char *ccnb, struct ccn_parsed_ContentObject *pco) 
 {
 	struct ccn_charbuf *key_name = ccn_charbuf_create();
-	ccn_charbuf_append(key_name, ccnb + pco->offset[CCN_PCO_B_KeyName_Name], pco->offset[CCN_PCO_E_KeyName_Name] - pco->offset[CCN_PCO_B_KeyName_Name]);
+	ccn_charbuf_append(key_name, ccnb + pco->offset[CCN_PCO_B_KeyName_Name], 
+	pco->offset[CCN_PCO_E_KeyName_Name] - pco->offset[CCN_PCO_B_KeyName_Name]);
 
 	return key_name;
 }