<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EmbLogic &#187; c programming</title>
	<atom:link href="https://www.emblogic.com/blog/tag/c-programming/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Sockets &#8211; Basics</title>
		<link>https://www.emblogic.com/blog/01/sockets-basics/</link>
		<comments>https://www.emblogic.com/blog/01/sockets-basics/#comments</comments>
		<pubDate>Sun, 31 Jan 2016 09:29:56 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 04: FTP based Client Server using Threads and Sockets]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[client-server]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sockets]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13210</guid>
		<description><![CDATA[Sockets ======= A socket is a communication mechanism that allows client/server systems to be developed either locally,on a single machine, or across networks. - It is a communication mechanism - It allows client/server systems to developed either locally or across &#8230; <a href="https://www.emblogic.com/blog/01/sockets-basics/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Sockets<br />
=======<br />
A socket is a communication mechanism that allows client/server systems to be developed either locally,on a single machine, or across networks.<br />
- It is a communication mechanism<br />
- It allows client/server systems to developed either locally or across a network.<br />
- Socket is an extension of pipe<br />
- They make clear distinction between client and server.<br />
- Socket can be named or unnamed.<br />
- They make clear distinction between server and client.<br />
- In a socket, one side is client/server for read/write/both and other side is a network interface.</p>
<p>There are 6 tasks in a socket :-<br />
1. Create Socket.<br />
2. Give name to socket.<br />
3. Listen to socket for incoming connection.<br />
4. Coonect the client to server.<br />
5. Accept the request by server from client.<br />
6. Close the socket</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/sockets-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fgets &#8211; scanning string with spaces</title>
		<link>https://www.emblogic.com/blog/01/fgets-scanning-string-with-spaces/</link>
		<comments>https://www.emblogic.com/blog/01/fgets-scanning-string-with-spaces/#comments</comments>
		<pubDate>Sun, 24 Jan 2016 09:55:21 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fgets]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13188</guid>
		<description><![CDATA[Prototype : - #include &#60;stdio.h&#62; char *fgets(char *s, int size, FILE *stream); Defination :- fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s.  Reading  stops  after an &#8230; <a href="https://www.emblogic.com/blog/01/fgets-scanning-string-with-spaces/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Prototype : -</p>
<p>#include &lt;stdio.h&gt;</p>
<p>char *fgets(char *s, int size, FILE *stream);</p>
<p>Defination :-</p>
<p>fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s.  Reading  stops  after an EOF or a newline.  If a newline is read, it is stored into the buffer.  A terminating null byte (&#8221;) is stored after the last charac?<br />
ter in the buffer.<br />
Use :-</p>
<p>It is used to scan a string with spaces until a new line character or EOF character is inserted.</p>
<p>It takes input until enter is pressed.</p>
<p>It is used in place of scanf();</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/fgets-scanning-string-with-spaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bubble sorting using function</title>
		<link>https://www.emblogic.com/blog/01/bubble-sorting-using-function/</link>
		<comments>https://www.emblogic.com/blog/01/bubble-sorting-using-function/#comments</comments>
		<pubDate>Sat, 23 Jan 2016 06:00:50 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[bubble sorting]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[sorting]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13184</guid>
		<description><![CDATA[#include&#60;stdio.h&#62; //Program for Bubble Sorting int * bubblesort(int*,int); int display(int *,int); int main() { int i,j,a[100],N,temp; printf(&#8220;Enter no.of elements you want to sort:\t&#8221;); scanf(&#8220;%d&#8221;,&#38;N);//Max. no. of elements printf(&#8220;Enter %d elements you want to sort:\n&#8221;,N); for(i=0;i&#60;N;i++) scanf(&#8220;%d&#8221;,(a+i)); printf(&#8220;\nBefore sorting:\t&#8221;); display(a,N); //Sorting &#8230; <a href="https://www.emblogic.com/blog/01/bubble-sorting-using-function/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;<br />
//Program for Bubble Sorting<br />
int * bubblesort(int*,int);<br />
int display(int *,int);<br />
int main()<br />
{<br />
int i,j,a[100],N,temp;</p>
<p>printf(&#8220;Enter no.of elements you want to sort:\t&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;N);//Max. no. of elements<br />
printf(&#8220;Enter %d elements you want to sort:\n&#8221;,N);<br />
for(i=0;i&lt;N;i++)<br />
scanf(&#8220;%d&#8221;,(a+i));<br />
printf(&#8220;\nBefore sorting:\t&#8221;);<br />
display(a,N);<br />
//Sorting Starts<br />
bubblesort(a,N);<br />
//Sorting Ends<br />
printf(&#8220;\nAfter sorting:\t&#8221;);<br />
display(a,N);<br />
}</p>
<p>int * bubblesort(int *a,int N)<br />
{<br />
int i,j,temp;<br />
for(i=0;i&lt;N-1;i++)<br />
for(j=0;j&lt;N-i-1;j++)<br />
if(a[j]&gt;a[j+1])<br />
{<br />
temp = a[j];<br />
a[j]=a[j+1];<br />
a[j+1]=temp;<br />
}<br />
return a;</p>
<p>}<br />
int display(int* a,int N)<br />
{<br />
int i;<br />
for(i=0;i&lt;N;i++)<br />
printf(&#8220;%d\t&#8221;,*(a+i));</p>
<p>return 0;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/bubble-sorting-using-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic linklist operations</title>
		<link>https://www.emblogic.com/blog/01/basic-linklist-operations/</link>
		<comments>https://www.emblogic.com/blog/01/basic-linklist-operations/#comments</comments>
		<pubDate>Sat, 16 Jan 2016 07:07:03 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[linklist]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[log]]></category>
		<category><![CDATA[rcs]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13182</guid>
		<description><![CDATA[RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict a: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: stdio.h and stdlib.h are added. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- revision 1.1    locked by: a; date: 2015/07/02 &#8230; <a href="https://www.emblogic.com/blog/01/basic-linklist-operations/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
a: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
stdio.h and stdlib.h are added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: a;<br />
date: 2015/07/02 08:03:30;  author: a;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: prototypes.h,v<br />
Working file: prototypes.h<br />
head: 1.12<br />
branch:<br />
locks: strict<br />
a: 1.12<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 12;    selected revisions: 12<br />
description:<br />
struct node is defined.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12    locked by: a;<br />
date: 2015/07/02 13:26:00;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/07/02 12:33:04;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/07/02 12:06:18;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/07/02 11:53:38;  author: a;  state: Exp;  lines: +4 -2<br />
display_list() added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/07/02 10:23:57;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/07/02 10:14:17;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/07/02 10:12:21;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/07/02 10:08:38;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/07/02 09:52:43;  author: a;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/07/02 09:25:49;  author: a;  state: Exp;  lines: +2 -2<br />
int i i.e position is added to insert_element().<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/07/02 08:43:09;  author: a;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/07/02 08:03:30;  author: a;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: delete_menu.c,v<br />
Working file: delete_menu.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
delete menu created.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/07/08 06:45:44;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: display_list.c,v<br />
Working file: display_list.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/07/02 12:45:04;  author: a;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: exit_list.c,v<br />
Working file: exit_list.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
a: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
exit function created.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: a;<br />
date: 2015/07/02 08:48:07;  author: a;  state: Exp;  lines: +2 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/07/02 08:38:15;  author: a;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: insert_element.c,v<br />
Working file: insert_element.c<br />
head: 1.22<br />
branch:<br />
locks: strict<br />
a: 1.22<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 22;    selected revisions: 22<br />
description:<br />
insert_element() is created.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22    locked by: a;<br />
date: 2015/07/02 15:32:22;  author: a;  state: Exp;  lines: +10 -5<br />
Differentiate between first node and other nodes.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2015/07/02 13:38:04;  author: a;  state: Exp;  lines: +5 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2015/07/02 13:26:02;  author: a;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2015/07/02 13:11:31;  author: a;  state: Exp;  lines: +3 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2015/07/02 13:09:32;  author: a;  state: Exp;  lines: +5 -4<br />
local is used .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2015/07/02 11:54:24;  author: a;  state: Exp;  lines: +1 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2015/07/02 10:24:00;  author: a;  state: Exp;  lines: +5 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2015/07/02 10:17:12;  author: a;  state: Exp;  lines: +0 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/07/02 10:08:41;  author: a;  state: Exp;  lines: +7 -5<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/07/02 09:58:31;  author: a;  state: Exp;  lines: +2 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/07/02 09:41:45;  author: a;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/07/02 09:36:08;  author: a;  state: Exp;  lines: +5 -6<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/07/02 09:26:44;  author: a;  state: Exp;  lines: +1 -1<br />
i is the position in link list.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/07/02 08:28:19;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/07/02 08:26:28;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/07/02 08:25:31;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/07/02 08:24:00;  author: a;  state: Exp;  lines: +4 -4<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/07/02 08:18:27;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/07/02 08:16:51;  author: a;  state: Exp;  lines: +1 -2<br />
elment is corrected<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/07/02 08:14:33;  author: a;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/07/02 08:10:59;  author: a;  state: Exp;  lines: +7 -5<br />
Element is inserted.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/07/02 08:04:28;  author: a;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: insert_end.c,v<br />
Working file: insert_end.c<br />
head: 1.8<br />
branch:<br />
locks: strict<br />
root: 1.8<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 8;    selected revisions: 8<br />
description:<br />
Element is inserted at end .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8    locked by: root;<br />
date: 2015/07/08 07:16:45;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/07/08 07:11:46;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/07/08 07:10:10;  author: root;  state: Exp;  lines: +3 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/07/08 07:08:11;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/07/08 07:07:12;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/07/08 07:04:12;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/07/08 06:49:24;  author: root;  state: Exp;  lines: +1 -0<br />
Macro is printed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/07/08 06:46:19;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: insert_menu.c,v<br />
Working file: insert_menu.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
Insert menu created.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2015/07/08 06:45:31;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: insert_node.c,v<br />
Working file: insert_node.c<br />
head: 1.7<br />
branch:<br />
locks: strict<br />
root: 1.7<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 7;    selected revisions: 7<br />
description:<br />
Insert node is now creating a random node temp only .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7    locked by: root;<br />
date: 2015/07/08 07:18:30;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/07/08 07:16:43;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/07/08 07:10:09;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/07/08 06:59:35;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/07/08 06:57:05;  author: root;  state: Exp;  lines: +1 -1<br />
Prototype is corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/07/08 06:55:14;  author: root;  state: Exp;  lines: +27 -4<br />
Cases created and respective functions are called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/07/08 06:45:52;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: linklist.c,v<br />
Working file: linklist.c<br />
head: 1.11<br />
branch:<br />
locks: strict<br />
a: 1.11<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 11;    selected revisions: 11<br />
description:<br />
Element is inserted<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11    locked by: a;<br />
date: 2015/07/02 15:26:31;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/07/02 15:25:39;  author: a;  state: Exp;  lines: +3 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/07/02 13:41:59;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/07/02 13:40:18;  author: a;  state: Exp;  lines: +8 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/07/02 12:23:58;  author: a;  state: Exp;  lines: +1 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/07/02 11:53:51;  author: a;  state: Exp;  lines: +6 -5<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/07/02 09:48:46;  author: a;  state: Exp;  lines: +6 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/07/02 09:26:25;  author: a;  state: Exp;  lines: +2 -1<br />
position i.e i is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/07/02 08:43:11;  author: a;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/07/02 08:38:12;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/07/02 08:03:30;  author: a;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: main_choice.c,v<br />
Working file: main_choice.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
a: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
Chices are given.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: a;<br />
date: 2015/07/02 11:53:57;  author: a;  state: Exp;  lines: +1 -1<br />
choice for display is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/07/02 08:03:54;  author: a;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: perform.c,v<br />
Working file: perform.c<br />
head: 1.22<br />
branch:<br />
locks: strict<br />
a: 1.22<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 22;    selected revisions: 22<br />
description:<br />
perform() is created.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22    locked by: a;<br />
date: 2015/07/02 15:35:42;  author: a;  state: Exp;  lines: +1 -1<br />
node is now inserted in new.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2015/07/02 15:19:02;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2015/07/02 13:50:48;  author: a;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2015/07/02 13:35:40;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2015/07/02 13:34:54;  author: a;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2015/07/02 13:33:44;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2015/07/02 13:30:45;  author: a;  state: Exp;  lines: +1 -1<br />
start is replaced by new.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2015/07/02 13:26:03;  author: a;  state: Exp;  lines: +8 -5<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2015/07/02 12:35:41;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2015/07/02 12:33:58;  author: a;  state: Exp;  lines: +0 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2015/07/02 11:54:26;  author: a;  state: Exp;  lines: +5 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2015/07/02 10:24:00;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2015/07/02 10:08:42;  author: a;  state: Exp;  lines: +1 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2015/07/02 09:48:48;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2015/07/02 09:44:54;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2015/07/02 09:41:46;  author: a;  state: Exp;  lines: +6 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2015/07/02 09:36:09;  author: a;  state: Exp;  lines: +2 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2015/07/02 09:27:00;  author: a;  state: Exp;  lines: +2 -2<br />
i is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2015/07/02 08:43:11;  author: a;  state: Exp;  lines: +1 -2<br />
..<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2015/07/02 08:38:14;  author: a;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2015/07/02 08:24:02;  author: a;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2015/07/02 08:05:00;  author: a;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/basic-linklist-operations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Send a signal -Using Kill command</title>
		<link>https://www.emblogic.com/blog/01/how-to-send-a-signal-using-kill-command/</link>
		<comments>https://www.emblogic.com/blog/01/how-to-send-a-signal-using-kill-command/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 12:01:08 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[kill]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux system programming]]></category>
		<category><![CDATA[pid]]></category>
		<category><![CDATA[sending signals]]></category>
		<category><![CDATA[signal]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13175</guid>
		<description><![CDATA[Send a signal by Kill command ======================= - To send a signal to a process other than current task. - It has prototype :- int kill(pid_t pid, int signo); - It is included using header :- #include&#60;signal.h&#62; - The system &#8230; <a href="https://www.emblogic.com/blog/01/how-to-send-a-signal-using-kill-command/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Send a signal by Kill command<br />
=======================<br />
- To send a signal to a process other than current task.<br />
- It has prototype :-<br />
int kill(pid_t pid, int signo);<br />
- It is included using header :-<br />
#include&lt;signal.h&gt;<br />
- The system data type pid_t is defined in header :-<br />
#include&lt;sys/types.h&gt;<br />
- signo is the signal number of signal to be send.<br />
- pid is the PID of the process to which signal is to be send.<br />
- pid can take value:-<br />
* 0 &#8211;&gt; To send signo signal to every process in invoking process&#8217; process group<br />
* -1 &#8211;&gt;To send signo signal to every process for which invoking process has permission to send a signal, except itself and init<br />
* n(&lt;-1) &#8211;&gt; All process in process group<br />
* n(&gt;0)  &#8211;&gt; process with PID n is signalled.<br />
- This take an optional signal name or number and the PID to send the signal.</p>
<p>- For eg. To send &#8216;hangup&#8217; signal to shell running on PID 1001, we use command :-<br />
kill(1001,HUP);<br />
- killall is used to send signal to all the processes running.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/how-to-send-a-signal-using-kill-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to register a signal</title>
		<link>https://www.emblogic.com/blog/01/how-to-register-a-signal/</link>
		<comments>https://www.emblogic.com/blog/01/how-to-register-a-signal/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 11:59:04 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux system programming]]></category>
		<category><![CDATA[register a signal]]></category>
		<category><![CDATA[signals]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13173</guid>
		<description><![CDATA[Register a signal ================== - Program can handle a signal using signal library function signal(). - signal() is used to register the signal handler function with kernel on behalf of current process. - It is included in header :- #include&#60;header.h&#62; &#8230; <a href="https://www.emblogic.com/blog/01/how-to-register-a-signal/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Register a signal<br />
==================<br />
- Program can handle a signal using signal library function signal().<br />
- signal() is used to register the signal handler function with kernel on behalf of current process.<br />
- It is included in header :-<br />
#include&lt;header.h&gt;<br />
- Prototype of function is :-<br />
void* (signal(int signo,void(*func)(int)))(int);<br />
- signal() function takes 2 parameters, signo and func.<br />
- The signal to be caught or ignored is given as argument signo.<br />
- The function to be called when the specified signal is received is given as func.<br />
- The function must take a single int argument (the signal received) and has return type void.</p>
<p>- The signal() command can be used in 3 modes :-<br />
(i) Default mode (Terminate the process)<br />
SIG_DFL &#8211;&gt; is used in place of func.<br />
(ii) Ignore the signal<br />
SIG_IGN &#8211;&gt; is used in place of func.<br />
(iii) User defined mode<br />
User defined function is used in place of func.</p>
<p>- The signal command returns the function which is setup to handle the signal, SIG_DFL or SIG_IGN in 3rd, 1st and 2nd cases respectively.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/how-to-register-a-signal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About Signals</title>
		<link>https://www.emblogic.com/blog/01/about-signals/</link>
		<comments>https://www.emblogic.com/blog/01/about-signals/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 11:57:12 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[ipc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[signals]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13171</guid>
		<description><![CDATA[Signals ======== - A signal is an event generated by UNIX/LINUX system in response to some condition. - On receipt of a signal, process may in turn take some action. - Signals are generated by some error conditions such as:- &#8230; <a href="https://www.emblogic.com/blog/01/about-signals/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Signals<br />
========<br />
- A signal is an event generated by UNIX/LINUX system in response to some condition.<br />
- On receipt of a signal, process may in turn take some action.<br />
- Signals are generated by some error conditions such as:-<br />
* Memory Segment Violation<br />
* Floating Point Processor error<br />
* Illegal Instruction etc.<br />
- They are generated by shell and terminal handlers.<br />
- They cause interrupts.</p>
<p>- They can also be used to sent from one process to another as a way of passing information or modifying behaviour.</p>
<p>- As default, if a process receives any signal, process will be terminated immediately.<br />
- Usually a core dump file is created.</p>
<p>- The signals are defined by including header file signal.h<br />
- They all begn with &#8220;SIG&#8221;.<br />
- There are 64 signals in LINUX.<br />
- The can be listed using command :-<br />
kill -l<br />
- Some of the signals are :-</p>
<p>Signal Name       Description<br />
SIGABORT          Process Abort<br />
SIGALRM           Alarm Clock<br />
SIGFPE            Floating Point Exception<br />
SIGHUP            Hangup<br />
SIGILL            Illegal Instruction<br />
SIGINT            Terminal Interrupt<br />
SIGKILL           Kill (can&#8217;t be caught or ignored)<br />
SIGPIPE           Write on a pipe with no reader<br />
SIGQUIT           Terminal Quit<br />
SIGSEGV           Invalid memory segment access (Segmentation Fault)<br />
SIGTERM           Termination<br />
SIGUSR1           User-defined signal 1<br />
SIGUSR2           User-defined signal 2</p>
<p>SIGCHLD           Child process has stopped or exited<br />
SIGCONT           Continue exexuting, if stopped<br />
SIGSTOP           Stop Executing (Can&#8217;t be caught or ignored)<br />
SIGTSTP           Terminal stop signal<br />
SIGTTIN           Background process trying to read<br />
SIGTTOU           Background process trying to write</p>
<p>- SIGINT can be called using Ctrl-C<br />
- A signal has 3 steps:-<br />
1) raise<br />
2) catch<br />
3) ignore/handle</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/about-signals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Replacing a Process Image</title>
		<link>https://www.emblogic.com/blog/01/replacing-a-process-image/</link>
		<comments>https://www.emblogic.com/blog/01/replacing-a-process-image/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 10:40:34 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[exec]]></category>
		<category><![CDATA[execl]]></category>
		<category><![CDATA[execv]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[process replacement]]></category>
		<category><![CDATA[Replacing a Process Image]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13167</guid>
		<description><![CDATA[Replacing a Process Image ========================= - The exec function replaces current process with a new process. - The path of new process is specified as argument to exec. - It is defined in header : #include&#60;unistd.h&#62; - Last argument of &#8230; <a href="https://www.emblogic.com/blog/01/replacing-a-process-image/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Replacing a Process Image<br />
=========================<br />
- The exec function replaces current process with a new process.<br />
- The path of new process is specified as argument to exec.<br />
- It is defined in header :<br />
#include&lt;unistd.h&gt;<br />
- Last argument of function should be NULL.<br />
- It has 6 types of functions, whose prototype are :-<br />
(i) Complete path is specified<br />
int execl(const char * path, const char * arg0,const char * arg1,&#8230;,NULL);<br />
(ii) If file is at one of default paths<br />
int execlp(const char * file, const char * arg0,const char * arg1,&#8230;,NULL);<br />
(iii) If arguments are given as an vector(array)<br />
int execv(const char *path,char *const argv[]);<br />
(iv) If arguments are given as an vector(array) and file is at one of default paths<br />
int execvp(const char* file, char *const argv[]);<br />
(v) int execle(const char *path, const char * arg0, const char * arg1,&#8230;,NULL, char *const envp[]);<br />
(vi) int execve(const char *path, char *const argv[],char *const envp[] );</p>
<p>- The suffix p means to search PATH environmental variable.</p>
<p>- If the exec is executed successfully the statements after it will not be executed.<br />
- It is because the current process is replaced.<br />
- The arguments given to exec are used by main() function of new process as command line argument.<br />
- If exec fails, it returns -1<br />
- The open file descriptors remain open after the exec command.<br />
- These file descriptors can be passed to exec as command and can be used by the replaced process to read/write from opened file.<br />
- The argument is passed to exec as character.<br />
- For this sprintf() is used.<br />
- And for getting the file descriptors back , atoi() or integer typecasting can be used on the arguments of main().</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/replacing-a-process-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Orphan Process</title>
		<link>https://www.emblogic.com/blog/01/orphan-process/</link>
		<comments>https://www.emblogic.com/blog/01/orphan-process/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 10:39:03 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[orphan]]></category>
		<category><![CDATA[orphan process]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13165</guid>
		<description><![CDATA[Orphan Process =============== If in a process, the parent process is terminated before the child process, the child process become orphan - It takes the lowest possible process as its parent - And its PPID is changed to the PID &#8230; <a href="https://www.emblogic.com/blog/01/orphan-process/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Orphan Process<br />
===============<br />
If in a process, the parent process is terminated before the child process, the child process become orphan<br />
- It takes the lowest possible process as its parent<br />
- And its PPID is changed to the PID of its new parent process.<br />
- Mostly the new parent process in init process (PID = 1).<br />
- It is because init adopts the orphan process.<br />
- The child is then terminated normally by the init process.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/orphan-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zombie or Defunct Process</title>
		<link>https://www.emblogic.com/blog/01/zombie-or-defunct-process/</link>
		<comments>https://www.emblogic.com/blog/01/zombie-or-defunct-process/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 10:37:43 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[defunct]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[zombie]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13163</guid>
		<description><![CDATA[Zombie or Defunct Process ========================== If a child proces tries to teminate,its association with parent remains until the parent terminates normally or calls wait. - The child process entry in process table is therfore not freed up immediately. - Althougth &#8230; <a href="https://www.emblogic.com/blog/01/zombie-or-defunct-process/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Zombie or Defunct Process<br />
==========================<br />
If a child proces tries to teminate,its association with parent remains until the parent terminates normally or calls wait.<br />
- The child process entry in process table is therfore not freed up immediately.<br />
- Althougth the process is no longer active, the child remains still in system because its exit code is needed to be stored in case of parent subsequently</p>
<p>calls wait.<br />
- The process becomes defunct or zombie process.<br />
- It is shown by &#8216;Z&#8217; or &#8216;Z+&#8217; in process table.</p>
<p>- If the parent is terminated abnormally, the zombie child process will not be terminated (which is not good).</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/zombie-or-defunct-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>waiting for a process</title>
		<link>https://www.emblogic.com/blog/01/waiting-for-a-process/</link>
		<comments>https://www.emblogic.com/blog/01/waiting-for-a-process/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 10:36:05 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[wait]]></category>
		<category><![CDATA[waiting for a process]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13160</guid>
		<description><![CDATA[Waiting For a Process ===================== - Sometime we would like to find out when a child process has finished. - It is needed for parent process to wait until the child finishes before continuing by calling wait. - It has &#8230; <a href="https://www.emblogic.com/blog/01/waiting-for-a-process/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Waiting For a Process<br />
=====================<br />
- Sometime we would like to find out when a child process has finished.<br />
- It is needed for parent process to wait until the child finishes before continuing by calling wait.<br />
- It has prototype :<br />
pid_t wait(int *stat_loc);<br />
- It is declared in header :<br />
#include&lt;sys/wait.h&gt;<br />
- It has a return type pid_t which is declared in header :<br />
#include&lt;sys/types.h&gt;<br />
- The wait system call causes a parent process to pause until one of its child processes is stopped.<br />
- The wait returns PID of child process which is terminated.<br />
- The status information determine the exit status of child process (i.e  value returned from main or passed to exit)<br />
- If stat_loc is not a null pointer, the status information will be written to location to which it points.<br />
- The status information can be determined by using macros defined in header sys/wait.h</p>
<p>Macro                                        Defination<br />
WIFEXITED(stat_val)          Nonzero if child terminated normally<br />
WEXITSTATUS(stat_val)    If WIFEXITED is nonzero, this returns child exit code</p>
<p>WIFSIGNALED(stat_val)    Nonzero if child is terminated on an uncaught signal<br />
WTERMSIG(stat_val)           If WIFSIGNALED is nonzero, this returns signal number</p>
<p>WIFSTOPPED(stat_val)       Nonzero if the child has stopped<br />
WSTOPSIG(stat_val)            If WIFSTOPPED is nonzero, this returns signal number</p>
<p>- The wait() is used when a result of process done by child is used by the parent for further processing.<br />
- For eg :-<br />
In a program child process write to file1 and parent has to read from (the written data of)file1.<br />
If the scheduler runs read() command of the parent process before the write() command of child process, it reads nothing.<br />
- So, wait() is used before read() statement in parent process to avoid the unnecessory error.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/waiting-for-a-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Process Duplication using fork</title>
		<link>https://www.emblogic.com/blog/01/process-duplication-using-fork/</link>
		<comments>https://www.emblogic.com/blog/01/process-duplication-using-fork/#comments</comments>
		<pubDate>Fri, 15 Jan 2016 10:28:24 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Linux Internals and System Programming]]></category>
		<category><![CDATA[Project 03: Client Server Communication using Linux and IPC]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[process duplication]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13158</guid>
		<description><![CDATA[Process Duplication using system call fork ============================== - A new process is created using fork(). - fork() is a system call. - fork duplicates the current process. - It creates a new entry in the process table with many of &#8230; <a href="https://www.emblogic.com/blog/01/process-duplication-using-fork/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Process Duplication using system call fork<br />
==============================<br />
- A new process is created using fork().<br />
- fork() is a system call.<br />
- fork duplicates the current process.<br />
- It creates a new entry in the process table with many of same</p>
<p>attributes as current process.<br />
- The new process (known as child process) is almost identical to</p>
<p>original process (known as parent process).<br />
- PPID (Parent Process Identification) of new process is PID of</p>
<p>original process.<br />
- PID (Process Identification) of new process is lowest PID</p>
<p>available after the PID of original process .Mostly it is 1 greater</p>
<p>than the original process(If available).<br />
- Prototype of fork :-<br />
pid_t fork(void);<br />
- Function fork() is declared in header:<br />
#include&lt;unistd.h&gt;<br />
- It has a return type pid_t .<br />
- System type pid_t is declared in header :<br />
#include&lt;sys/types.h&gt;<br />
- The Process counter of new process starts from fork() statement.<br />
- So, fork() is executed twice.<br />
- When fork() is executed by parent, it returns PID of child</p>
<p>process on success.<br />
- When fork() is executed by child, it returns 0 for success.<br />
- If fork fails, it returns -1.<br />
- Falure may be due to :-<br />
* Limit on the number of child processes that a parent may</p>
<p>have (CHILD_MAX), in which errno will be set to &#8220;EAGAIN&#8221;</p>
<p>* If process table or virtual memory is filled (not enough</p>
<p>space), errno variable will be set to &#8220;ENOMEM&#8221;.<br />
- The return value of fork() can be used to determine whether child</p>
<p>or parent is executing.<br />
- For eg. :-<br />
#include&lt;stdio.h&gt;<br />
#include&lt;unistd.h&gt;<br />
#include&lt;sys/types.h&gt;<br />
int main()<br />
{<br />
pid_t fret;<br />
printf(&#8220;Only parent execute\n&#8221;);<br />
fret = fork();//Fork statement<br />
printf(&#8220;Both parent and child execute this statement.\n&#8221;);<br />
switch(fork)<br />
{<br />
case -1 :<br />
perror(&#8220;fork&#8221;);<br />
exit(EXIT_FAILURE);<br />
break;<br />
case 0 :<br />
printf(&#8220;Child executing\n&#8221;);<br />
break;<br />
default :<br />
printf(&#8220;Parent executing\n&#8221;);<br />
break;<br />
}<br />
return 0;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/process-duplication-using-fork/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple Data Compressions And Encription Using Iterative Technique</title>
		<link>https://www.emblogic.com/blog/01/multiple-data-compressions-and-encription-using-iterative-technique/</link>
		<comments>https://www.emblogic.com/blog/01/multiple-data-compressions-and-encription-using-iterative-technique/#comments</comments>
		<pubDate>Thu, 14 Jan 2016 18:15:45 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[Project 2: Multiple Data Compression and Encryption]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[c project]]></category>
		<category><![CDATA[data compression in c]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[gedit]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mdcaeuit]]></category>
		<category><![CDATA[rcs]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13155</guid>
		<description><![CDATA[Logfile of compleated Project &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; RCS file: header.h,v Working file: header.h head: 1.1 branch: locks: strict root: 1.1 access list: symbolic names: keyword substitution: kv total revisions: 1;    selected revisions: 1 description: It includes basic headers which are used &#8230; <a href="https://www.emblogic.com/blog/01/multiple-data-compressions-and-encription-using-iterative-technique/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Logfile of compleated Project</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
RCS file: header.h,v<br />
Working file: header.h<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It includes basic headers which are used in project.<br />
It includes stdio.h, fcntl.h, unistd.h, string.h, stdlib.h<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2016/01/03 12:49:49;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: prototypes.h,v<br />
Working file: prototypes.h<br />
head: 1.10<br />
branch:<br />
locks: strict<br />
root: 1.10<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 10;    selected revisions: 10<br />
description:<br />
It contains the prototypes of functions which are defined and used in project.<br />
It include prototype of openfile(), creatmasterarray(), findcodelength(), writema() functions.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10    locked by: root;<br />
date: 2016/01/03 20:47:30;  author: root;  state: Exp;  lines: +0 -1<br />
The prototype of findchar() is moved to compression.h<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/03 18:55:55;  author: root;  state: Exp;  lines: +0 -7<br />
The prototypes of functions which are used oly in compression are removed.<br />
They are added in a seperate file compression.h<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/03 17:35:16;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/03 15:59:03;  author: root;  state: Exp;  lines: +1 -1<br />
Name of function changes from index to findindex()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/03 15:57:23;  author: root;  state: Exp;  lines: +2 -0<br />
The prototype of findindex() is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 14:52:44;  author: root;  state: Exp;  lines: +2 -2<br />
the Prototype of compression() and compress4() is changed.<br />
The return type changes from char to unsigned char.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 14:11:16;  author: root;  state: Exp;  lines: +7 -7<br />
Prototype of compression() and compress4() has been changed.<br />
There 1st argument changes from char * to int .<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 14:00:58;  author: root;  state: Exp;  lines: +7 -0<br />
Prototype of compresss4() has been included.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 13:39:18;  author: root;  state: Exp;  lines: +1 -0<br />
The prototype of function compression has been included.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 12:51:08;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: compress2.c,v<br />
Working file: compress2.c<br />
head: 1.7<br />
branch:<br />
locks: strict<br />
root: 1.7<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 7;    selected revisions: 7<br />
description:<br />
compress2() function is created.<br />
1 byte has 4 characters.<br />
4 characters are read in one loop.<br />
Loop breaking statement is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7    locked by: root;<br />
date: 2016/01/04 08:27:15;  author: root;  state: Exp;  lines: +1 -1<br />
loop is running from 0 to 3 instead of 1 to 4.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/04 08:20:22;  author: root;  state: Exp;  lines: +3 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/04 08:16:10;  author: root;  state: Exp;  lines: +2 -2<br />
Change in finding byte<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/04 08:05:17;  author: root;  state: Exp;  lines: +1 -0<br />
Print statement for writing byte is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/04 08:03:18;  author: root;  state: Exp;  lines: +1 -1<br />
2nd argument of write instruction is corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/04 08:02:43;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/04 07:59:09;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: compress3.c,v<br />
Working file: compress3.c<br />
head: 1.18<br />
branch:<br />
locks: strict<br />
root: 1.18<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 18;    selected revisions: 18<br />
description:<br />
compress3() function is defined here.<br />
It writes 8 characters in 3 bytes.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18    locked by: root;<br />
date: 2016/01/04 07:26:53;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2016/01/04 07:25:15;  author: root;  state: Exp;  lines: +3 -3<br />
compilation errors removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2016/01/04 07:24:08;  author: root;  state: Exp;  lines: +7 -8<br />
Few useless statements were removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/01/04 07:04:27;  author: root;  state: Exp;  lines: +1 -1<br />
Problem of a character is solved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2016/01/04 07:00:38;  author: root;  state: Exp;  lines: +3 -3<br />
Finding problem in byte 2<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/01/04 06:54:02;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/04 06:47:36;  author: root;  state: Exp;  lines: +3 -1<br />
Condition for EOF is correcting.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/04 06:08:48;  author: root;  state: Exp;  lines: +3 -3<br />
Eof<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/04 05:54:52;  author: root;  state: Exp;  lines: +3 -3<br />
The EOF is changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/04 05:52:12;  author: root;  state: Exp;  lines: +3 -3<br />
Solving problem in 3rd byte.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/04 05:50:02;  author: root;  state: Exp;  lines: +3 -1<br />
Finding problem in compress3()<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/04 05:02:45;  author: root;  state: Exp;  lines: +1 -1<br />
No. of characters written is callculated.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/04 04:56:27;  author: root;  state: Exp;  lines: +1 -1<br />
Break condition changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/04 04:53:28;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/04 04:52:19;  author: root;  state: Exp;  lines: +1 -1<br />
The print statement is changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/04 04:40:34;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/04 04:37:37;  author: root;  state: Exp;  lines: +5 -7<br />
compilation error removed.<br />
No. of characters written at a time corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/04 04:32:23;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: compress4.c,v<br />
Working file: compress4.c<br />
head: 1.45<br />
branch:<br />
locks: strict<br />
root: 1.45<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 45;    selected revisions: 45<br />
description:<br />
Only Prototype of compress4() is written<br />
And file name is printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.45    locked by: root;<br />
date: 2016/01/03 21:09:17;  author: root;  state: Exp;  lines: +3 -2<br />
It changes return type from char * to int<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.44<br />
date: 2016/01/03 20:54:52;  author: root;  state: Exp;  lines: +3 -5<br />
Useless variable is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.43<br />
date: 2016/01/03 20:48:37;  author: root;  state: Exp;  lines: +4 -4<br />
The data type of index is changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.42<br />
date: 2016/01/03 20:40:30;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.41<br />
date: 2016/01/03 20:39:53;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.40<br />
date: 2016/01/03 20:38:12;  author: root;  state: Exp;  lines: +3 -2<br />
Problem of EOF is solved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.39<br />
date: 2016/01/03 20:36:04;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.38<br />
date: 2016/01/03 20:17:44;  author: root;  state: Exp;  lines: +4 -0<br />
Condition for writing End Of File Character.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.37<br />
date: 2016/01/03 18:51:56;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.36<br />
date: 2016/01/03 17:43:49;  author: root;  state: Exp;  lines: +1 -1<br />
compilation error<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.35<br />
date: 2016/01/03 17:41:03;  author: root;  state: Exp;  lines: +2 -2<br />
Compressed array is written to compressed file.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.34<br />
date: 2016/01/03 17:37:35;  author: root;  state: Exp;  lines: +1 -1<br />
Print statement removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.33<br />
date: 2016/01/03 17:02:42;  author: root;  state: Exp;  lines: +1 -1<br />
One more argument for writing file descriptor is added.<br />
It is of type int.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.32<br />
date: 2016/01/03 16:56:23;  author: root;  state: Exp;  lines: +2 -2<br />
Print statements chanded.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.31<br />
date: 2016/01/03 16:55:26;  author: root;  state: Exp;  lines: +4 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.30<br />
date: 2016/01/03 16:52:37;  author: root;  state: Exp;  lines: +0 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.29<br />
date: 2016/01/03 16:49:42;  author: root;  state: Exp;  lines: +1 -1<br />
hexa code of compressed charater is printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.28<br />
date: 2016/01/03 16:47:12;  author: root;  state: Exp;  lines: +4 -3<br />
ANDing is used in place of ORing<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.27<br />
date: 2016/01/03 16:43:28;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.26<br />
date: 2016/01/03 16:40:19;  author: root;  state: Exp;  lines: +1 -1<br />
print statement removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.25<br />
date: 2016/01/03 16:37:45;  author: root;  state: Exp;  lines: +1 -1<br />
unsigned char is used instead of char<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.24<br />
date: 2016/01/03 16:36:26;  author: root;  state: Exp;  lines: +5 -5<br />
Typecasting is used instead of sprints.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.23<br />
date: 2016/01/03 16:19:41;  author: root;  state: Exp;  lines: +1 -1<br />
Printing statement change<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22<br />
date: 2016/01/03 16:18:17;  author: root;  state: Exp;  lines: +1 -1<br />
argument of sprintf() is corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2016/01/03 16:17:34;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2016/01/03 16:16:27;  author: root;  state: Exp;  lines: +2 -2<br />
character array is used as argument for sprintf instead of char.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2016/01/03 16:13:24;  author: root;  state: Exp;  lines: +1 -1<br />
argument of sprintf() is corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2016/01/03 16:12:35;  author: root;  state: Exp;  lines: +2 -2<br />
sprintf() is used instead of typecasting.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2016/01/03 16:10:56;  author: root;  state: Exp;  lines: +5 -3<br />
typecasting<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2016/01/03 16:07:46;  author: root;  state: Exp;  lines: +1 -1<br />
typecasting is done.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/01/03 16:06:16;  author: root;  state: Exp;  lines: +3 -2<br />
index are printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2016/01/03 15:59:51;  author: root;  state: Exp;  lines: +1 -1<br />
Compilation error resolved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/01/03 15:55:02;  author: root;  state: Exp;  lines: +7 -4<br />
Index of character is used instead of character to be written in file.<br />
findindex() function is used for finding index of a character.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/03 15:39:08;  author: root;  state: Exp;  lines: +2 -1<br />
Testing the result<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/03 15:34:30;  author: root;  state: Exp;  lines: +1 -1<br />
test statement removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/03 15:33:47;  author: root;  state: Exp;  lines: +6 -5<br />
The compressed characters are printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/03 15:28:09;  author: root;  state: Exp;  lines: +1 -1<br />
compilation error resolved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/03 15:24:23;  author: root;  state: Exp;  lines: +5 -2<br />
lseek is used to change the ointer from end to starting.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/03 15:21:52;  author: root;  state: Exp;  lines: +3 -0<br />
Finding the problem<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/03 15:17:54;  author: root;  state: Exp;  lines: +1 -0<br />
Read character is printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 14:59:05;  author: root;  state: Exp;  lines: +2 -2<br />
Compilation Errors.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 14:55:14;  author: root;  state: Exp;  lines: +2 -2<br />
Compilation error due to ; has been resolved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 14:50:11;  author: root;  state: Exp;  lines: +60 -2<br />
Compression is done using bitshift operators -left shift and right shift.<br />
2 characters are ORing into 1 and written to compressed array.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 14:08:20;  author: root;  state: Exp;  lines: +3 -1<br />
1st argument of compress4() has been change from char * to int type.<br />
Now it will accept the fd of opened file i.i textfile.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 14:00:13;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: compress5.c,v<br />
Working file: compress5.c<br />
head: 1.20<br />
branch:<br />
locks: strict<br />
root: 1.20<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 20;    selected revisions: 20<br />
description:<br />
compress5() dunction is defined.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20    locked by: root;<br />
date: 2016/01/04 00:09:36;  author: root;  state: Exp;  lines: +1 -1<br />
Printing changes<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2016/01/04 00:08:26;  author: root;  state: Exp;  lines: +7 -5<br />
test is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2016/01/04 00:06:28;  author: root;  state: Exp;  lines: +1 -1<br />
Unneccesort print statement removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2016/01/04 00:04:31;  author: root;  state: Exp;  lines: +1 -2<br />
No. of written character sis counted.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2016/01/04 00:00:02;  author: root;  state: Exp;  lines: +31 -11<br />
All the characters are written in file.<br />
The ch=255 is written as EOF character.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/01/03 23:47:52;  author: root;  state: Exp;  lines: +3 -3<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2016/01/03 23:45:12;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/01/03 23:42:38;  author: root;  state: Exp;  lines: +35 -2<br />
5 bytes are written for 8 characters.<br />
1 byte is written for 1 character.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/03 22:54:23;  author: root;  state: Exp;  lines: +4 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/03 22:53:10;  author: root;  state: Exp;  lines: +3 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/03 22:51:42;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/03 22:50:34;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/03 22:48:58;  author: root;  state: Exp;  lines: +2 -0<br />
break statement added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/03 22:47:34;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/03 22:45:51;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 22:45:01;  author: root;  state: Exp;  lines: +1 -1<br />
compilation error resolved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 22:43:56;  author: root;  state: Exp;  lines: +1 -0<br />
Read character is printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 22:42:57;  author: root;  state: Exp;  lines: +65 -66<br />
Formatting of program is done<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 22:38:18;  author: root;  state: Exp;  lines: +45 -56<br />
characters of textfile are read 1 by 1<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 22:18:57;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: compress6.c,v<br />
Working file: compress6.c<br />
head: 1.6<br />
branch:<br />
locks: strict<br />
root: 1.6<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 6;    selected revisions: 6<br />
description:<br />
compress6() is defined here.<br />
3 bytes contain 4 characters.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6    locked by: root;<br />
date: 2016/01/04 09:56:51;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/04 09:52:59;  author: root;  state: Exp;  lines: +1 -1<br />
Print statements modified.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/04 09:51:46;  author: root;  state: Exp;  lines: +2 -2<br />
Change in print statements.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/04 09:47:19;  author: root;  state: Exp;  lines: +1 -1<br />
No. of times characters read at a time dec.<br />
for this no. of times loop run dec.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/04 09:44:50;  author: root;  state: Exp;  lines: +1 -1<br />
ce in printf resolved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/04 09:43:08;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: compress7.c,v<br />
Working file: compress7.c<br />
head: 1.3<br />
branch:<br />
locks: strict<br />
root: 1.3<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 3;    selected revisions: 3<br />
description:<br />
compress7() is defined.<br />
7bytes written for 8 characcters read.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3    locked by: root;<br />
date: 2016/01/06 07:42:20;  author: root;  state: Exp;  lines: +1 -1<br />
Terminating condition changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/06 06:36:23;  author: root;  state: Exp;  lines: +28 -11<br />
Bytes written are printed<br />
Error conditions are added.<br />
Comments are added of the process of Program.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/06 06:22:08;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: compress.c,v<br />
Working file: compress.c<br />
head: 1.13<br />
branch:<br />
locks: strict<br />
root: 1.13<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 13;    selected revisions: 13<br />
description:<br />
Writing a common function which can replace all the compress2() to compress7() using single function.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13    locked by: root;<br />
date: 2016/01/06 13:46:41;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/06 13:41:46;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/06 13:30:15;  author: root;  state: Exp;  lines: +4 -4<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/06 13:24:41;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/06 13:24:16;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/06 13:22:18;  author: root;  state: Exp;  lines: +3 -1<br />
Breaking condition added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/06 13:20:18;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/06 13:18:29;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/06 13:17:59;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/06 13:14:55;  author: root;  state: Exp;  lines: +6 -4<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/06 13:05:55;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/06 13:05:29;  author: root;  state: Exp;  lines: +5 -4<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/06 13:01:17;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: compression.c,v<br />
Working file: compression.c<br />
head: 1.18<br />
branch:<br />
locks: strict<br />
root: 1.18<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 18;    selected revisions: 18<br />
description:<br />
Defination of compression() has been started.<br />
Only Prototype is written.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18    locked by: root;<br />
date: 2016/01/06 13:02:05;  author: root;  state: Exp;  lines: +5 -4<br />
compress() is called in place of compress2() and compress4().<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2016/01/06 06:22:40;  author: root;  state: Exp;  lines: +1 -1<br />
compress7() is called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2016/01/04 09:43:37;  author: root;  state: Exp;  lines: +1 -1<br />
compress6() is included.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/01/04 08:00:43;  author: root;  state: Exp;  lines: +7 -10<br />
compress2() is called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2016/01/04 04:34:13;  author: root;  state: Exp;  lines: +1 -1<br />
compress3() is called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/01/03 22:19:12;  author: root;  state: Exp;  lines: +1 -1<br />
compress5() function is called for code length 5.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/03 22:10:52;  author: root;  state: Exp;  lines: +1 -1<br />
A variable is initialized by 1<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/03 21:09:57;  author: root;  state: Exp;  lines: +2 -2<br />
It returns no. of integers written in compressed file.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/03 18:52:09;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/03 17:42:11;  author: root;  state: Exp;  lines: +2 -1<br />
fd and wfd are closed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/03 17:03:20;  author: root;  state: Exp;  lines: +2 -2<br />
One more argument of type int is added.<br />
It is wfd in which write file descriptor in which compressed file has to be written.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/03 14:51:23;  author: root;  state: Exp;  lines: +2 -2<br />
return type changes from char to extern unsigned char.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/03 14:09:27;  author: root;  state: Exp;  lines: +7 -7<br />
1st argument of compress4() has been change from char * to int type.<br />
&gt;&gt; Now it will accept the fd of opened file i.i textfile.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 14:03:13;  author: root;  state: Exp;  lines: +1 -1<br />
The arguments of function call compress4() has been corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 14:00:45;  author: root;  state: Exp;  lines: +6 -1<br />
compress4() has been called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 13:52:20;  author: root;  state: Exp;  lines: +5 -5<br />
print statement has been added in corresponding cases of different code lenght just to chech the proper functioning.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 13:49:28;  author: root;  state: Exp;  lines: +46 -2<br />
codelenght is find out usinf findcodelength() function.<br />
Then the corresponding copress function will be called like compress2(), compress4() etc. using switch statement.<br />
It returns 0 on failure.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 13:36:50;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: creatma.c,v<br />
Working file: creatma.c<br />
head: 1.10<br />
branch:<br />
locks: strict<br />
root: 1.10<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 10;    selected revisions: 10<br />
description:<br />
it defines the function creatmasterarray()<br />
It has only one argument int fd which is file descriptor of open file which is to be compressed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10    locked by: root;<br />
date: 2016/01/04 08:10:54;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/04 08:08:10;  author: root;  state: Exp;  lines: +2 -1<br />
Textfile buffer is printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/03 21:16:12;  author: root;  state: Exp;  lines: +1 -1<br />
free() is used to free the memory allocated to buffer.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/03 18:37:45;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/03 18:36:49;  author: root;  state: Exp;  lines: +1 -1<br />
Master array is created.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 18:35:00;  author: root;  state: Exp;  lines: +1 -1<br />
print statements added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 13:37:46;  author: root;  state: Exp;  lines: +0 -2<br />
The file descriptor of opensed file (textfile) is not closed .<br />
i.e close() statement is removed.<br />
As it will be used by the compression function.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 13:17:31;  author: root;  state: Exp;  lines: +20 -0<br />
Error conditions for malloc and realloc are added.<br />
exit() function is used for sending failure condition instead of using return 0.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 13:08:27;  author: root;  state: Exp;  lines: +24 -4<br />
It includes function creatmasterarray().<br />
It has prototype extern char * creatmasterarray(int)<br />
It has only one argument which is the file descriptor of file which is already opened in read only mode.<br />
It returns pointer to master array on success.<br />
It returns 0 on failure.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 12:19:48;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: decompress2.c,v<br />
Working file: decompress2.c<br />
head: 1.5<br />
branch:<br />
locks: strict<br />
root: 1.5<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 5;    selected revisions: 5<br />
description:<br />
decompress2() is defined<br />
1 byteread has 4 characters in it.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5    locked by: root;<br />
date: 2016/01/04 09:04:47;  author: root;  state: Exp;  lines: +1 -0<br />
Characters are printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/04 09:02:43;  author: root;  state: Exp;  lines: +1 -0<br />
i is declared.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/04 09:02:03;  author: root;  state: Exp;  lines: +2 -2<br />
compilation error resolving.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/04 09:00:17;  author: root;  state: Exp;  lines: +15 -30<br />
EOF character is finded.<br />
Breaking condition is applied.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/04 08:35:57;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: decompress3.c,v<br />
Working file: decompress3.c<br />
head: 1.13<br />
branch:<br />
locks: strict<br />
root: 1.13<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 13;    selected revisions: 13<br />
description:<br />
decompress3() function is defined here.<br />
It writes 8 characters from 3 bytes read.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13    locked by: root;<br />
date: 2016/01/04 07:13:55;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/04 07:12:46;  author: root;  state: Exp;  lines: +1 -1<br />
EOF character is written to decompressed file<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/04 07:12:11;  author: root;  state: Exp;  lines: +2 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/04 06:41:28;  author: root;  state: Exp;  lines: +2 -2<br />
5th and 6th characters are corrrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/04 06:31:15;  author: root;  state: Exp;  lines: +1 -1<br />
Prnting the index.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/04 06:29:05;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/04 06:28:15;  author: root;  state: Exp;  lines: +1 -0<br />
Problem inbyte 2 is resolving.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/04 06:20:35;  author: root;  state: Exp;  lines: +3 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/04 06:10:56;  author: root;  state: Exp;  lines: +1 -1<br />
Passing argument to findindex() is changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/04 05:34:42;  author: root;  state: Exp;  lines: +3 -1<br />
Terminating condition is changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/04 05:31:18;  author: root;  state: Exp;  lines: +20 -24<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/04 05:28:28;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/04 05:26:06;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: decompress4.c,v<br />
Working file: decompress4.c<br />
head: 1.25<br />
branch:<br />
locks: strict<br />
root: 1.25<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 25;    selected revisions: 25<br />
description:<br />
Character corresponding to index is findout using findchar().<br />
One byte has 2 characters.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.25    locked by: root;<br />
date: 2016/01/04 08:40:40;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.24<br />
date: 2016/01/04 08:36:26;  author: root;  state: Exp;  lines: +7 -5<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.23<br />
date: 2016/01/04 01:38:09;  author: root;  state: Exp;  lines: +2 -2<br />
argument of findchar() changed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22<br />
date: 2016/01/04 01:31:40;  author: root;  state: Exp;  lines: +2 -2<br />
One more argument is added to findchar() which is type of decompression i.e.5<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2016/01/03 21:21:16;  author: root;  state: Exp;  lines: +3 -2<br />
Print staements removed(which are unnneccesary).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2016/01/03 21:19:02;  author: root;  state: Exp;  lines: +4 -3<br />
Print statements are removed.<br />
The decompressed characters are printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2016/01/03 21:02:00;  author: root;  state: Exp;  lines: +1 -1<br />
Last digit problem is resolved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2016/01/03 20:14:12;  author: root;  state: Exp;  lines: +2 -1<br />
The problem of last byte is to be solved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2016/01/03 20:10:38;  author: root;  state: Exp;  lines: +1 -1<br />
finding Problem.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2016/01/03 20:01:47;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/01/03 20:00:55;  author: root;  state: Exp;  lines: +1 -0<br />
Detecting Problem.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2016/01/03 19:59:45;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/01/03 19:58:48;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/03 19:57:06;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/03 19:55:55;  author: root;  state: Exp;  lines: +2 -1<br />
Detecting error.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/03 19:53:04;  author: root;  state: Exp;  lines: +8 -2<br />
Error check statements added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/03 19:50:56;  author: root;  state: Exp;  lines: +4 -0<br />
break condition added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/03 19:49:34;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/03 19:43:00;  author: root;  state: Exp;  lines: +2 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/03 19:40:45;  author: root;  state: Exp;  lines: +2 -0<br />
Print statements added for troubleshooting.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 19:37:27;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 19:36:29;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 19:35:30;  author: root;  state: Exp;  lines: +1 -1<br />
defination of index  is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 19:33:44;  author: root;  state: Exp;  lines: +3 -3<br />
Compilation error resolved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 19:30:37;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: decompress5.c,v<br />
Working file: decompress5.c<br />
head: 1.27<br />
branch:<br />
locks: strict<br />
root: 1.27<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 27;    selected revisions: 27<br />
description:<br />
decompress5() function is written.<br />
% bytes are read at ones.<br />
5 bytes are read at ones and it breaks at ch=255.<br />
5 bytes means 8 characters.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.27    locked by: root;<br />
date: 2016/01/04 09:11:50;  author: root;  state: Exp;  lines: +3 -2<br />
Print statement modified.<br />
EOF is corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.26<br />
date: 2016/01/04 09:10:03;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.25<br />
date: 2016/01/04 07:13:56;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.24<br />
date: 2016/01/04 07:13:08;  author: root;  state: Exp;  lines: +1 -1<br />
EOF character is written to decompressed file.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.23<br />
date: 2016/01/04 07:12:14;  author: root;  state: Exp;  lines: +8 -10<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.22<br />
date: 2016/01/04 05:31:21;  author: root;  state: Exp;  lines: +25 -21<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.21<br />
date: 2016/01/04 05:26:55;  author: root;  state: Exp;  lines: +21 -25<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.20<br />
date: 2016/01/04 02:17:12;  author: root;  state: Exp;  lines: +1 -1<br />
Breaking condition changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.19<br />
date: 2016/01/04 02:16:12;  author: root;  state: Exp;  lines: +1 -2<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.18<br />
date: 2016/01/04 02:14:58;  author: root;  state: Exp;  lines: +3 -47<br />
Unneccesory code is deleted.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.17<br />
date: 2016/01/04 02:10:06;  author: root;  state: Exp;  lines: +11 -7<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.16<br />
date: 2016/01/04 02:04:53;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.15<br />
date: 2016/01/04 02:02:00;  author: root;  state: Exp;  lines: +3 -1<br />
EOF problem resolving.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14<br />
date: 2016/01/04 01:55:46;  author: root;  state: Exp;  lines: +1 -4<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/01/04 01:55:09;  author: root;  state: Exp;  lines: +9 -2<br />
Eof condition checked.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/04 01:50:09;  author: root;  state: Exp;  lines: +9 -6<br />
a variable is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/04 01:38:33;  author: root;  state: Exp;  lines: +1 -1<br />
argument of findchar() changed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/04 01:32:16;  author: root;  state: Exp;  lines: +1 -1<br />
ne more argument is added to findchar() which is type of decompression i<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/04 01:23:13;  author: root;  state: Exp;  lines: +0 -5<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/04 01:22:01;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/04 01:20:46;  author: root;  state: Exp;  lines: +5 -0<br />
Eof condition testing.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/04 01:17:13;  author: root;  state: Exp;  lines: +7 -7<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/04 01:15:45;  author: root;  state: Exp;  lines: +17 -0<br />
Condition for EOF is finding.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/04 01:06:21;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/04 01:05:37;  author: root;  state: Exp;  lines: +4 -3<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/04 01:02:42;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/04 00:59:24;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: decompress6.c,v<br />
Working file: decompress6.c<br />
head: 1.6<br />
branch:<br />
locks: strict<br />
root: 1.6<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 6;    selected revisions: 6<br />
description:<br />
decompress6() is defined .<br />
It writes 4 characters for 3 bytes read.<br />
EOF condition is also checked.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6    locked by: root;<br />
date: 2016/01/04 10:31:58;  author: root;  state: Exp;  lines: +2 -1<br />
Print statement changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/04 10:30:46;  author: root;  state: Exp;  lines: +1 -1<br />
The no. of characters read at once changed from 5 to 3.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/04 10:23:59;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/04 10:23:08;  author: root;  state: Exp;  lines: +1 -1<br />
Finding problem in decompression..<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/04 10:14:50;  author: root;  state: Exp;  lines: +1 -1<br />
name of function is corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/04 10:13:10;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: decompress7.c,v<br />
Working file: decompress7.c<br />
head: 1.14<br />
branch:<br />
locks: strict<br />
root: 1.14<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 14;    selected revisions: 14<br />
description:<br />
decompress7() is defined.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14    locked by: root;<br />
date: 2016/01/06 08:22:34;  author: root;  state: Exp;  lines: +6 -0<br />
Correcting problem of last character in 7th byte.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/01/06 08:14:50;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/06 08:08:02;  author: root;  state: Exp;  lines: +4 -0<br />
Initializing index with 0.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/06 08:00:01;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/06 07:58:16;  author: root;  state: Exp;  lines: +1 -1<br />
There are 8 index at a time than 7<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/06 07:49:16;  author: root;  state: Exp;  lines: +4 -1<br />
EOF condition finding.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/06 07:44:08;  author: root;  state: Exp;  lines: +1 -1<br />
Print statement for printing index is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/06 07:43:15;  author: root;  state: Exp;  lines: +1 -1<br />
Reading one byte at ones.<br />
The read character is assigned to bytes[i]<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/06 07:42:51;  author: root;  state: Exp;  lines: +2 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/06 07:08:35;  author: root;  state: Exp;  lines: +1 -1<br />
Printing the index and character.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/06 07:06:09;  author: root;  state: Exp;  lines: +6 -7<br />
Testing break of loop.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/06 07:00:34;  author: root;  state: Exp;  lines: +2 -2<br />
compilation error resolved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/06 06:57:07;  author: root;  state: Exp;  lines: +22 -34<br />
8 characters are written for 7 bytes read.<br />
Terminating condition is written.<br />
EOF character is written.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/06 06:41:01;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: decompression.c,v<br />
Working file: decompression.c<br />
head: 1.12<br />
branch:<br />
locks: strict<br />
root: 1.12<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 12;    selected revisions: 12<br />
description:<br />
It finds codelength using findcodelength() function.<br />
switch case is used for various decompress functions of diferrent code lengths.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12    locked by: root;<br />
date: 2016/01/06 06:41:12;  author: root;  state: Exp;  lines: +27 -2<br />
decompress7() is called<br />
return value of decompress2() ,decompress3() ,decompress4(),decompress5(),decompress6() and decompress7() are checked.<br />
They show error when the return value less than 0.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/04 10:18:31;  author: root;  state: Exp;  lines: +1 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/04 10:17:26;  author: root;  state: Exp;  lines: +1 -1<br />
Prototype of function call decompress6() is corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/04 10:16:04;  author: root;  state: Exp;  lines: +1 -1<br />
decompress6() is called for code length =6.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/04 08:36:30;  author: root;  state: Exp;  lines: +3 -3<br />
decompress2() has been called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/04 05:27:04;  author: root;  state: Exp;  lines: +2 -2<br />
decompress3() is called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/04 01:00:28;  author: root;  state: Exp;  lines: +1 -1<br />
decompress5() is called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 21:23:35;  author: root;  state: Exp;  lines: +1 -1<br />
Unnecessory Print statements removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 19:31:21;  author: root;  state: Exp;  lines: +7 -1<br />
decompress4() is called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 19:04:00;  author: root;  state: Exp;  lines: +2 -2<br />
conflicting data types.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 18:59:42;  author: root;  state: Exp;  lines: +1 -1<br />
ce<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 18:52:35;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: findchar.c,v<br />
Working file: findchar.c<br />
head: 1.13<br />
branch:<br />
locks: strict<br />
root: 1.13<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 13;    selected revisions: 13<br />
description:<br />
findchar() is defined.<br />
It will return the character corresponding to index in master array.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13    locked by: root;<br />
date: 2016/01/04 09:00:43;  author: root;  state: Exp;  lines: +3 -1<br />
condition for code length 2 is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/04 01:36:29;  author: root;  state: Exp;  lines: +5 -5<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/04 01:32:49;  author: root;  state: Exp;  lines: +11 -3<br />
Prototype includes one more integer typeargument which is type of argument.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/03 21:19:31;  author: root;  state: Exp;  lines: +1 -1<br />
The print statement is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/03 20:08:58;  author: root;  state: Exp;  lines: +2 -2<br />
Detecting errors.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/03 20:06:43;  author: root;  state: Exp;  lines: +2 -2<br />
Detecting problem<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/03 20:03:55;  author: root;  state: Exp;  lines: +1 -0<br />
Finding Problem<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/03 19:58:50;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 19:49:42;  author: root;  state: Exp;  lines: +2 -2<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 19:45:09;  author: root;  state: Exp;  lines: +2 -0<br />
atoi is used.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 19:41:01;  author: root;  state: Exp;  lines: +1 -1<br />
Print statements added to find error.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 19:35:42;  author: root;  state: Exp;  lines: +0 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 19:32:01;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: findcl.c,v<br />
Working file: findcl.c<br />
head: 1.2<br />
branch:<br />
locks: strict<br />
root: 1.2<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 2;    selected revisions: 2<br />
description:<br />
it defines function findcodelength()<br />
It has one argument of char * type.<br />
This argument is for string whose codelenghth is to be found.<br />
Codelength is no. of minimum bits required to represent all the characters in a different way.<br />
it has return type integer which returns the code lenghth on success and returns -1 for failure.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2    locked by: root;<br />
date: 2016/01/04 04:46:58;  author: root;  state: Exp;  lines: +9 -9<br />
Code length fn. is changed.<br />
Now code length =2^n has codelength n.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 12:22:02;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: findindex.c,v<br />
Working file: findindex.c<br />
head: 1.12<br />
branch:<br />
locks: strict<br />
root: 1.12<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 12;    selected revisions: 12<br />
description:<br />
This function is used to find the index of Any character in the master array.<br />
It has 2 arguments<br />
1st is tthe character<br />
2nd argument is pointer to master array.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12    locked by: root;<br />
date: 2016/01/04 09:55:59;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/04 08:17:00;  author: root;  state: Exp;  lines: +1 -1<br />
Print statement added for resolving compress2() function.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/04 07:16:54;  author: root;  state: Exp;  lines: +1 -1<br />
print statement removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/04 06:54:06;  author: root;  state: Exp;  lines: +2 -2<br />
Prototype changed from char to unsigned char for 1st argument.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/04 06:06:51;  author: root;  state: Exp;  lines: +1 -1<br />
data type of index changed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/04 00:06:45;  author: root;  state: Exp;  lines: +1 -1<br />
nneccesort print statement removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/03 20:56:08;  author: root;  state: Exp;  lines: +1 -1<br />
function is corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 20:49:43;  author: root;  state: Exp;  lines: +1 -1<br />
Typecasting is used.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 20:46:03;  author: root;  state: Exp;  lines: +6 -4<br />
The return type of findindex() changed from unsigned int to unsigned char.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 16:02:28;  author: root;  state: Exp;  lines: +5 -2<br />
if-else condition is added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 15:58:47;  author: root;  state: Exp;  lines: +1 -1<br />
name of function changes from index to findindex.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 15:55:52;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: mdc.c,v<br />
Working file: mdc.c<br />
head: 1.14<br />
branch:<br />
locks: strict<br />
root: 1.14<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 14;    selected revisions: 14<br />
description:<br />
It is the main file in which all the prossesing takes place.<br />
It has the function main()<br />
It contains all the function calls.<br />
A file &#8220;textfile&#8221; is open.<br />
Unique/Master array of this file is created by using function creatmasterarray() and return the starting address of the unique array.<br />
Before this a file textfile is open in read-only mode using function openfile()<br />
which return the fd of opened file.<br />
codelength of the master array is find out using function findcodelength().<br />
The unique array is written to a file &#8220;keyfile&#8221; using function writema().<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14    locked by: root;<br />
date: 2016/01/04 07:15:45;  author: root;  state: Exp;  lines: +3 -1<br />
findcodelength() function removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/01/03 22:11:18;  author: root;  state: Exp;  lines: +1 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/03 21:40:55;  author: root;  state: Exp;  lines: +3 -6<br />
Terminal arguments are given in main() function as argv for name of files to open,read, write.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/03 21:16:35;  author: root;  state: Exp;  lines: +1 -0<br />
The no. of bytes written to decompressed file is printed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/03 21:10:24;  author: root;  state: Exp;  lines: +2 -2<br />
Data type of ca changes from char* to int<br />
In function compression()<br />
It takes no. of integers written to compressedfile.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/03 18:54:05;  author: root;  state: Exp;  lines: +2 -2<br />
compressioon.h is included.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/03 17:36:33;  author: root;  state: Exp;  lines: +2 -1<br />
wfd is passes to compression(0<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/03 17:35:13;  author: root;  state: Exp;  lines: +7 -1<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/03 14:51:53;  author: root;  state: Exp;  lines: +1 -1<br />
the data type of compressed array i.e. ca is changed from char to unsigned char.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 14:09:37;  author: root;  state: Exp;  lines: +1 -1<br />
In function call compression() 1st expression changes from &#8220;textfile&#8221; (name of file to be compressed.) to fd (which is file descriptor of file already opened).<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 13:41:41;  author: root;  state: Exp;  lines: +5 -0<br />
Error condition of compression function added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 13:40:03;  author: root;  state: Exp;  lines: +1 -1<br />
There is a compilation error due to non placing ;<br />
It is put there.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 13:39:02;  author: root;  state: Exp;  lines: +3 -1<br />
The function compression() has been called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 12:37:58;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: mddc.c,v<br />
Working file: mddc.c<br />
head: 1.14<br />
branch:<br />
locks: strict<br />
root: 1.14<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 14;    selected revisions: 14<br />
description:<br />
It is The main file for decompression.<br />
It opens the compressedfile and keyfile in Read Only mode<br />
And decompressed file in Write Only Mode.<br />
The unique array is retrieved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.14    locked by: root;<br />
date: 2016/01/04 05:39:39;  author: root;  state: Exp;  lines: +2 -0<br />
Master array is printed<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.13<br />
date: 2016/01/03 21:45:42;  author: root;  state: Exp;  lines: +1 -1<br />
Compilation error resolved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.12<br />
date: 2016/01/03 21:44:54;  author: root;  state: Exp;  lines: +3 -3<br />
Command line arguments are used for file names.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.11<br />
date: 2016/01/03 21:21:55;  author: root;  state: Exp;  lines: +0 -7<br />
findcodelength() function is removed.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.10<br />
date: 2016/01/03 18:54:23;  author: root;  state: Exp;  lines: +3 -2<br />
decompression.h is included.<br />
Decompression function is called.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.9<br />
date: 2016/01/03 18:40:16;  author: root;  state: Exp;  lines: +1 -1<br />
Compilation errors resolved.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.8<br />
date: 2016/01/03 18:39:32;  author: root;  state: Exp;  lines: +12 -7<br />
Error statements are added (if any arise<br />
)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.7<br />
date: 2016/01/03 18:31:57;  author: root;  state: Exp;  lines: +5 -5<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.6<br />
date: 2016/01/03 18:30:48;  author: root;  state: Exp;  lines: +6 -0<br />
Print statements added<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.5<br />
date: 2016/01/03 18:26:30;  author: root;  state: Exp;  lines: +1 -1<br />
Print statement corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.4<br />
date: 2016/01/03 18:25:40;  author: root;  state: Exp;  lines: +1 -0<br />
*** empty log message ***<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.3<br />
date: 2016/01/03 18:23:20;  author: root;  state: Exp;  lines: +1 -1<br />
Print statement added.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.2<br />
date: 2016/01/03 18:16:21;  author: root;  state: Exp;  lines: +2 -2<br />
Compilation error corrected.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1<br />
date: 2016/01/03 18:13:28;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: readfile.c,v<br />
Working file: readfile.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It has function openfile().<br />
Its prototype is extern int openfile(char *)<br />
It opens a file in read only mode and return the file descriptor of opened file.<br />
It returns -1 on failure.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2016/01/03 12:44:11;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
<p>RCS file: writema.c,v<br />
Working file: writema.c<br />
head: 1.1<br />
branch:<br />
locks: strict<br />
root: 1.1<br />
access list:<br />
symbolic names:<br />
keyword substitution: kv<br />
total revisions: 1;    selected revisions: 1<br />
description:<br />
It defines function writema().<br />
This function has prototype : extern int writema(char *,char *)<br />
It has 2 arguments,1st is address of unique array to be written and other is name of file in which it s to be written.<br />
It open the file in write only mode and write master array to it.<br />
It returns 0 on success and -1 on failure.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
revision 1.1    locked by: root;<br />
date: 2016/01/03 12:46:33;  author: root;  state: Exp;<br />
Initial revision<br />
=============================================================================</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/multiple-data-compressions-and-encription-using-iterative-technique/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selection Sorting in C</title>
		<link>https://www.emblogic.com/blog/01/selection-sorting-in-c/</link>
		<comments>https://www.emblogic.com/blog/01/selection-sorting-in-c/#comments</comments>
		<pubDate>Sun, 10 Jan 2016 10:03:19 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[data structures]]></category>
		<category><![CDATA[data structures using c]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[selection sorting]]></category>
		<category><![CDATA[sorting]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13144</guid>
		<description><![CDATA[#include&#60;stdio.h&#62; //Program for Selection Sorting int main() { int i,j,a[100],N,temp; printf(&#8220;Enter no.of elements you want to sort:\t&#8221;); scanf(&#8220;%d&#8221;,&#38;N);//max no. of elements printf(&#8220;Enter %d elements you want to sort:\n&#8221;,N); for(i=0;i&#60;N;i++) scanf(&#8220;%d&#8221;,(a+i)); printf(&#8220;\nBefore sorting:\t&#8221;); for(i=0;i&#60;N;i++) printf(&#8220;%d\t&#8221;,*(a+i)); //Sorting Starts for(i=0;i&#60;N-1;i++) for(j=i+1;j&#60;N;j++) if(a[i]&#62;a[j]) { &#8230; <a href="https://www.emblogic.com/blog/01/selection-sorting-in-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;<br />
//Program for Selection Sorting<br />
int main()<br />
{<br />
int i,j,a[100],N,temp;</p>
<p>printf(&#8220;Enter no.of elements you want to sort:\t&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;N);//max no. of elements<br />
printf(&#8220;Enter %d elements you want to sort:\n&#8221;,N);<br />
for(i=0;i&lt;N;i++)<br />
scanf(&#8220;%d&#8221;,(a+i));<br />
printf(&#8220;\nBefore sorting:\t&#8221;);<br />
for(i=0;i&lt;N;i++)<br />
printf(&#8220;%d\t&#8221;,*(a+i));<br />
//Sorting Starts<br />
for(i=0;i&lt;N-1;i++)<br />
for(j=i+1;j&lt;N;j++)<br />
if(a[i]&gt;a[j])<br />
{<br />
temp = a[j];<br />
a[j]=a[i];<br />
a[i]=temp;<br />
}<br />
//Sorting Ends<br />
printf(&#8220;\nAfter sorting:\t&#8221;);<br />
for(i=0;i&lt;N;i++)<br />
printf(&#8220;%d\t&#8221;,*(a+i));<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/selection-sorting-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bubble Sorting in C</title>
		<link>https://www.emblogic.com/blog/01/bubble-sorting-in-c/</link>
		<comments>https://www.emblogic.com/blog/01/bubble-sorting-in-c/#comments</comments>
		<pubDate>Sun, 10 Jan 2016 09:58:16 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[bubble sorting]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[data structures using c]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[sorting]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13142</guid>
		<description><![CDATA[#include&#60;stdio.h&#62; //Program for Bubble Sorting int main() { int i,j,a[100],N,temp; printf(&#8220;Enter no.of elements you want to sort:\t&#8221;); scanf(&#8220;%d&#8221;,&#38;N);//Max. no. of elements printf(&#8220;Enter %d elements you want to sort:\n&#8221;,N); for(i=0;i&#60;N;i++) scanf(&#8220;%d&#8221;,(a+i)); printf(&#8220;\nBefore sorting:\t&#8221;); for(i=0;i&#60;N;i++) printf(&#8220;%d\t&#8221;,*(a+i)); //Sorting Starts for(i=0;i&#60;N-1;i++) for(j=0;j&#60;N-i-1;j++) if(a[j]&#62;a[j+1]) { &#8230; <a href="https://www.emblogic.com/blog/01/bubble-sorting-in-c/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;<br />
//Program for Bubble Sorting<br />
int main()<br />
{<br />
int i,j,a[100],N,temp;</p>
<p>printf(&#8220;Enter no.of elements you want to sort:\t&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;N);//Max. no. of elements<br />
printf(&#8220;Enter %d elements you want to sort:\n&#8221;,N);<br />
for(i=0;i&lt;N;i++)<br />
scanf(&#8220;%d&#8221;,(a+i));<br />
printf(&#8220;\nBefore sorting:\t&#8221;);<br />
for(i=0;i&lt;N;i++)<br />
printf(&#8220;%d\t&#8221;,*(a+i));<br />
//Sorting Starts<br />
for(i=0;i&lt;N-1;i++)<br />
for(j=0;j&lt;N-i-1;j++)<br />
if(a[j]&gt;a[j+1])<br />
{<br />
temp = a[j];<br />
a[j]=a[j+1];<br />
a[j+1]=temp;<br />
}<br />
//Sorting Ends<br />
printf(&#8220;\nAfter sorting:\t&#8221;);<br />
for(i=0;i&lt;N;i++)<br />
printf(&#8220;%d\t&#8221;,*(a+i));<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/bubble-sorting-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
