EmbLogic's Blog

File compression is done successfully.

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:
header file for mdc.c
—————————-
revision 1.1 locked by: root;
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.6
branch:
locks: strict
root: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 6
description:
This is multiple data compression and encription using iterative techniqe project
open file text in rea.
—————————-
revision 1.6 locked by: root;
date: 2015/02/02 09:04:40; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/02/02 09:01:27; author: root; state: Exp; lines: +9 -4
*** empty log message ***
—————————-
revision 1.4
date: 2015/02/02 08:59:49; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2015/02/02 08:55:44; author: root; state: Exp; lines: +8 -1
reading one character from file at a time and storing in array.
—————————-
revision 1.2
date: 2015/02/02 08:47:18; author: root; state: Exp; lines: +8 -0
argc is counted
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

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:
header file for mdc.c
—————————-
revision 1.1 locked by: root;
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.9
branch:
locks: strict
root: 1.9
access list:
symbolic names:
keyword substitution: kv
total revisions: 9; selected revisions: 9
description:
This is multiple data compression and encription using iterative techniqe project
open file text in rea.
—————————-
revision 1.9 locked by: root;
date: 2015/02/02 09:31:36; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.8
date: 2015/02/02 09:24:56; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/02/02 09:20:53; author: root; state: Exp; lines: +19 -5
creating master array
—————————-
revision 1.6
date: 2015/02/02 09:04:40; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/02/02 09:01:27; author: root; state: Exp; lines: +9 -4
*** empty log message ***
—————————-
revision 1.4
date: 2015/02/02 08:59:49; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2015/02/02 08:55:44; author: root; state: Exp; lines: +8 -1
reading one character from file at a time and storing in array.
—————————-
revision 1.2
date: 2015/02/02 08:47:18; author: root; state: Exp; lines: +8 -0
argc is counted
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

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:
header file for mdc.c
—————————-
revision 1.1 locked by: root;
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.13
branch:
locks: strict
root: 1.13
access list:
symbolic names:
keyword substitution: kv
total revisions: 13; selected revisions: 13
description:
This is multiple data compression and encription using iterative techniqe project
open file text in rea.
—————————-
revision 1.13 locked by: root;
date: 2015/02/05 08:41:41; author: root; state: Exp; lines: +13 -1
find th code length.
—————————-
revision 1.12
date: 2015/02/05 08:18:17; author: root; state: Exp; lines: +1 -0
print the length of ma
—————————-
revision 1.11
date: 2015/02/05 08:15:37; author: root; state: Exp; lines: +2 -2
change ma to buff
—————————-
revision 1.10
date: 2015/02/05 08:13:17; author: root; state: Exp; lines: +10 -1
find the length of master array.
store master array into encrypt_key file.
—————————-
revision 1.9
date: 2015/02/02 09:31:36; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.8
date: 2015/02/02 09:24:56; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/02/02 09:20:53; author: root; state: Exp; lines: +19 -5
creating master array
—————————-
revision 1.6
date: 2015/02/02 09:04:40; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/02/02 09:01:27; author: root; state: Exp; lines: +9 -4
*** empty log message ***
—————————-
revision 1.4
date: 2015/02/02 08:59:49; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2015/02/02 08:55:44; author: root; state: Exp; lines: +8 -1
reading one character from file at a time and storing in array.
—————————-
revision 1.2
date: 2015/02/02 08:47:18; author: root; state: Exp; lines: +8 -0
argc is counted
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
header file for mdc.c
—————————-
revision 1.4 locked by: root;
date: 2015/02/06 08:42:57; author: root; state: Exp; lines: +1 -0
define prototype for creat_master_array()
—————————-
revision 1.3
date: 2015/02/06 08:14:01; author: root; state: Exp; lines: +1 -0
define prototype for file_open()
—————————-
revision 1.2
date: 2015/02/06 08:05:19; author: root; state: Exp; lines: +1 -0
define prototype for code_length()
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.24
branch:
locks: strict
root: 1.24
access list:
symbolic names:
keyword substitution: kv
total revisions: 24; selected revisions: 24
description:
This is multiple data compression and encription using iterative techniqe project
open file text in rea.
—————————-
revision 1.24 locked by: root;
date: 2015/02/06 08:50:00; author: root; state: Exp; lines: +2 -0
*** empty log message ***
—————————-
revision 1.23
date: 2015/02/06 08:44:42; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.22
date: 2015/02/06 08:42:31; author: root; state: Exp; lines: +30 -21
implement creat_master_array()
—————————-
revision 1.21
date: 2015/02/06 08:31:57; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.20
date: 2015/02/06 08:30:38; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.19
date: 2015/02/06 08:27:58; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.18
date: 2015/02/06 08:22:41; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.17
date: 2015/02/06 08:15:26; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.16
date: 2015/02/06 08:13:26; author: root; state: Exp; lines: +14 -7
implement file_open()
—————————-
revision 1.15
date: 2015/02/06 08:06:10; author: root; state: Exp; lines: +1 -0
define cl
—————————-
revision 1.14
date: 2015/02/06 08:04:57; author: root; state: Exp; lines: +12 -6
implement code_length()
—————————-
revision 1.13
date: 2015/02/05 08:41:41; author: root; state: Exp; lines: +13 -1
find th code length.
—————————-
revision 1.12
date: 2015/02/05 08:18:17; author: root; state: Exp; lines: +1 -0
print the length of ma
—————————-
revision 1.11
date: 2015/02/05 08:15:37; author: root; state: Exp; lines: +2 -2
change ma to buff
—————————-
revision 1.10
date: 2015/02/05 08:13:17; author: root; state: Exp; lines: +10 -1
find the length of master array.
store master array into encrypt_key file.
—————————-
revision 1.9
date: 2015/02/02 09:31:36; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.8
date: 2015/02/02 09:24:56; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/02/02 09:20:53; author: root; state: Exp; lines: +19 -5
creating master array
—————————-
revision 1.6
date: 2015/02/02 09:04:40; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/02/02 09:01:27; author: root; state: Exp; lines: +9 -4
*** empty log message ***
—————————-
revision 1.4
date: 2015/02/02 08:59:49; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2015/02/02 08:55:44; author: root; state: Exp; lines: +8 -1
reading one character from file at a time and storing in array.
—————————-
revision 1.2
date: 2015/02/02 08:47:18; author: root; state: Exp; lines: +8 -0
argc is counted
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.7
branch:
locks: strict
root: 1.7
access list:
symbolic names:
keyword substitution: kv
total revisions: 7; selected revisions: 7
description:
header file for mdc.c
—————————-
revision 1.7 locked by: root;
date: 2015/02/10 14:17:47; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.6
date: 2015/02/10 13:47:29; author: root; state: Exp; lines: +1 -1
pass arguments to location()
—————————-
revision 1.5
date: 2015/02/10 11:05:55; author: root; state: Exp; lines: +4 -1
define prototype for compress()
define prototype for compress4()
define prototype for location()
—————————-
revision 1.4
date: 2015/02/06 08:42:57; author: root; state: Exp; lines: +1 -0
define prototype for creat_master_array()
—————————-
revision 1.3
date: 2015/02/06 08:14:01; author: root; state: Exp; lines: +1 -0
define prototype for file_open()
—————————-
revision 1.2
date: 2015/02/06 08:05:19; author: root; state: Exp; lines: +1 -0
define prototype for code_length()
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.41
branch:
locks: strict
root: 1.41
access list:
symbolic names:
keyword substitution: kv
total revisions: 41; selected revisions: 41
description:
This is multiple data compression and encription using iterative techniqe project
open file text in rea.
—————————-
revision 1.41 locked by: root;
date: 2015/02/10 14:43:43; author: root; state: Exp; lines: +26 -7
implement compress4()
—————————-
revision 1.40
date: 2015/02/10 14:32:51; author: root; state: Exp; lines: +2 -3
*** empty log message ***
—————————-
revision 1.39
date: 2015/02/10 14:30:51; author: root; state: Exp; lines: +10 -3
*** empty log message ***
—————————-
revision 1.38
date: 2015/02/10 14:20:26; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.37
date: 2015/02/10 14:19:00; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.36
date: 2015/02/10 14:17:46; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.35
date: 2015/02/10 14:16:31; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.34
date: 2015/02/10 14:15:57; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.33
date: 2015/02/10 14:07:00; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.32
date: 2015/02/10 14:06:31; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.31
date: 2015/02/10 14:04:03; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.30
date: 2015/02/10 14:02:07; author: root; state: Exp; lines: +3 -1
*** empty log message ***
—————————-
revision 1.29
date: 2015/02/10 14:00:22; author: root; state: Exp; lines: +1 -3
*** empty log message ***
—————————-
revision 1.28
date: 2015/02/10 13:51:31; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.27
date: 2015/02/10 13:50:07; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.26
date: 2015/02/10 13:42:39; author: root; state: Exp; lines: +1 -1
pass arguments to compress()
—————————-
revision 1.25
date: 2015/02/10 11:04:17; author: root; state: Exp; lines: +30 -0
implement prototype for compress()
implement prototype for compress4()
implement location()
—————————-
revision 1.24
date: 2015/02/06 08:50:00; author: root; state: Exp; lines: +2 -0
*** empty log message ***
—————————-
revision 1.23
date: 2015/02/06 08:44:42; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.22
date: 2015/02/06 08:42:31; author: root; state: Exp; lines: +30 -21
implement creat_master_array()
—————————-
revision 1.21
date: 2015/02/06 08:31:57; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.20
date: 2015/02/06 08:30:38; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.19
date: 2015/02/06 08:27:58; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.18
date: 2015/02/06 08:22:41; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.17
date: 2015/02/06 08:15:26; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.16
date: 2015/02/06 08:13:26; author: root; state: Exp; lines: +14 -7
implement file_open()
—————————-
revision 1.15
date: 2015/02/06 08:06:10; author: root; state: Exp; lines: +1 -0
define cl
—————————-
revision 1.14
date: 2015/02/06 08:04:57; author: root; state: Exp; lines: +12 -6
implement code_length()
—————————-
revision 1.13
date: 2015/02/05 08:41:41; author: root; state: Exp; lines: +13 -1
find th code length.
—————————-
revision 1.12
date: 2015/02/05 08:18:17; author: root; state: Exp; lines: +1 -0
print the length of ma
—————————-
revision 1.11
date: 2015/02/05 08:15:37; author: root; state: Exp; lines: +2 -2
change ma to buff
—————————-
revision 1.10
date: 2015/02/05 08:13:17; author: root; state: Exp; lines: +10 -1
find the length of master array.
store master array into encrypt_key file.
—————————-
revision 1.9
date: 2015/02/02 09:31:36; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.8
date: 2015/02/02 09:24:56; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/02/02 09:20:53; author: root; state: Exp; lines: +19 -5
creating master array
—————————-
revision 1.6
date: 2015/02/02 09:04:40; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/02/02 09:01:27; author: root; state: Exp; lines: +9 -4
*** empty log message ***
—————————-
revision 1.4
date: 2015/02/02 08:59:49; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2015/02/02 08:55:44; author: root; state: Exp; lines: +8 -1
reading one character from file at a time and storing in array.
—————————-
revision 1.2
date: 2015/02/02 08:47:18; author: root; state: Exp; lines: +8 -0
argc is counted
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment

master array created and calculated the code length using functions…

 

RCS file: header.h,v
Working file: header.h
head: 1.5
branch:
locks: strict
	root: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5;	selected revisions: 5
description:
It includes all the header files.
----------------------------
revision 1.5	locked by: root;
date: 2015/02/09 17:33:17;  author: root;  state: Exp;  lines: +2 -0
prototype for code_length() is provided.
----------------------------
revision 1.4
date: 2015/02/09 17:29:11;  author: root;  state: Exp;  lines: +1 -0
added string.h for strlen.
----------------------------
revision 1.3
date: 2015/02/09 17:27:27;  author: root;  state: Exp;  lines: +2 -0
prototype for master_array() is provided
----------------------------
revision 1.2
date: 2015/02/09 17:12:12;  author: root;  state: Exp;  lines: +2 -0
prototype of open_file() is provided.
----------------------------
revision 1.1
date: 2015/02/07 16:08:36;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.12
branch:
locks: strict
	root: 1.12
access list:
symbolic names:
keyword substitution: kv
total revisions: 12;	selected revisions: 12
description:
It is a program for multiple data compression and encryption using iterative technique.
----------------------------
revision 1.12	locked by: root;
date: 2015/02/09 17:33:40;  author: root;  state: Exp;  lines: +21 -12
defined and called the function named code_length()
----------------------------
revision 1.11
date: 2015/02/09 17:30:03;  author: root;  state: Exp;  lines: +1 -0
string is ended using ''
----------------------------
revision 1.10
date: 2015/02/09 17:28:02;  author: root;  state: Exp;  lines: +52 -39
defined and called the master_array().
----------------------------
revision 1.9
date: 2015/02/09 17:13:20;  author: root;  state: Exp;  lines: +14 -7
defined and called the function open_file()
----------------------------
revision 1.8
date: 2015/02/07 16:30:36;  author: root;  state: Exp;  lines: +1 -1
printf() statement is updated for printing cl.
';' is added.
----------------------------
revision 1.7
date: 2015/02/07 16:29:55;  author: root;  state: Exp;  lines: +16 -1
Calculated the code length for the master array.
----------------------------
revision 1.6
date: 2015/02/07 16:25:20;  author: root;  state: Exp;  lines: +1 -0
for loop is closed using '}' which was not closed earlier.
----------------------------
revision 1.5
date: 2015/02/07 16:23:15;  author: root;  state: Exp;  lines: +24 -8
Each new character read from a file is compared with each character in ma to store only the unique characters in the master array.
----------------------------
revision 1.4
date: 2015/02/07 16:18:28;  author: root;  state: Exp;  lines: +1 -1
printf statement is updated for printing the ma .
----------------------------
revision 1.3
date: 2015/02/07 16:16:24;  author: root;  state: Exp;  lines: +18 -2
Now i have copied the content of a file in a array named ma.
Initially i have allocated a memory for a single character using malloc().
After that i have reallocated a new memory for each new character using realloc function.
----------------------------
revision 1.2
date: 2015/02/07 16:11:02;  author: root;  state: Exp;  lines: +13 -1
I have opened a file using open function and command line arguments.
Also i have read the characters one by one from a file using read function in while loop.
----------------------------
revision 1.1
date: 2015/02/07 16:08:36;  author: root;  state: Exp;
Initial revision
=============================================================================

 

Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment

Creation of master array for MDC project without using functions

RCS file: mdc.c,v
Working file: mdc.c
head: 1.2
branch:
locks: strict
root: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
This is the base file for mdc project….
—————————-
revision 1.2 locked by: root;
date: 2015/02/05 10:46:55; author: root; state: Exp; lines: +16 -9
Here after opening the file…the file data is stored in a master array and array is printed…
master array is declared using concept of pointer and malloc.
memory is allocated dynamically using realloc().
—————————-
revision 1.1
date: 2015/02/05 08:05:18; author: root; state: Exp;
Initial revision
=============================================================================

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:
this is the base header file..
—————————-
revision 1.1 locked by: root;
date: 2015/02/05 08:05:18; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.3
branch:
locks: strict
root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3; selected revisions: 3
description:
This is the base file for mdc project….
—————————-
revision 1.3 locked by: root;
date: 2015/02/07 17:58:40; author: root; state: Exp; lines: +73 -15
Created “MASTER ARRAY” and calculated CODE LENGTH.
—————————-
revision 1.2
date: 2015/02/05 10:46:55; author: root; state: Exp; lines: +16 -9
Here after opening the file…the file data is stored in a master array and array is printed…
master array is declared using concept of pointer and malloc.
memory is allocated dynamically using realloc().
—————————-
revision 1.1
date: 2015/02/05 08:05:18; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment

CO NDITION FOR QUEUE FULL AND EMPTY.

if we check for the condition that queue is full than we will give this  condition

if((front==0&&rear==SIZE-1)||(front==rear+1))//this condition will check the queue and print that queue will be full.

and for the empty queue

if(front==rear==-1)//this is the condition for checking that queue is empty

 

Posted in Uncategorized | Leave a comment

Create different function in MDC

RCS file: projectmdc.c,v
Working file: projectmdc.c
head: 1.13
branch:
locks: strict
	root: 1.13
access list:
symbolic names:
keyword substitution: kv
total revisions: 13;	selected revisions: 13
description:
Introduce header.h file
create datain_file text file and open the
content through file decriptor
read the content from datain_file text file
Use the argc to count the no. of arguements
And argv to store the string in argv array
----------------------------
revision 1.13	locked by: root;
date: 2015/02/09 19:31:30;  author: root; 
state: Exp;  lines: +8 -7
create readchar() function to read the 'ch' from
file and compress the data
create no_of_bits() function to how much bits
are required for compress data
create file_open() function to fetch the first
arguement
----------------------------
revision 1.12
date: 2015/02/09 19:18:10;  author: root; 
state: Exp;  lines: +70 -66
Introduce function in MDC
convert codes into smaller function
----------------------------
revision 1.11
date: 2015/02/05 14:40:28;  author: root; 
state: Exp;  lines: +30 -1
Design the logic for how many data bits are
required for compressed data
by using if else condition
----------------------------
revision 1.10
date: 2015/02/05 13:47:56;  author: root; 
state: Exp;  lines: +3 -2
Now, count the number of compressed character
----------------------------
revision 1.9
date: 2015/02/05 13:39:25;  author: root; 
state: Exp;  lines: +1 -1
introduce break in flag = 0.
----------------------------
revision 1.8
date: 2015/02/05 13:30:27;  author: root; 
state: Exp;  lines: +21 -10
Now able to compress the data in datain_file

read data from file and compare it with master
array
introduce flags
----------------------------
revision 1.7
date: 2015/02/05 11:56:06;  author: root; 
state: Exp;  lines: +4 -4
modified the program just change the value of
charc
change the malloc arguement
----------------------------
revision 1.6
date: 2015/02/05 11:32:07;  author: root; 
state: Exp;  lines: +19 -18
Introduce malloc and realloc function
read character one by one and realloc the memory
successfully
introduce master array and print string on
display
----------------------------
revision 1.5
date: 2015/02/05 10:47:13;  author: root; 
state: Exp;  lines: +1 -1
change the format specifier in argv1
----------------------------
revision 1.4
date: 2015/02/05 10:46:12;  author: root; 
state: Exp;  lines: +1 -1
*** empty log message ***
----------------------------
revision 1.3
date: 2015/02/05 10:43:10;  author: root; 
state: Exp;  lines: +25 -8
*** empty log message ***
----------------------------
revision 1.2
date: 2015/02/05 08:25:39;  author: root; 
state: Exp;  lines: +7 -2
just checking the arguement
----------------------------
revision 1.1
date: 2015/02/04 11:00:43;  author: root; 
state: Exp;
Initial revision
=============================================================================

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:
create a seperate header.h file to store header
file indiviually
access this header file in projectmdc.c file
----------------------------
revision 1.1	locked by: root;
date: 2015/02/04 11:15:02;  author: root; 
state: Exp;
Initial revision
==============
Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment

Addition of two matrix using double pointer

RCS file: matrix.c,v
Working file: matrix.c
head: 1.1
branch:
locks: strict
vishal: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Print matrix using double pointer and function.
—————————-
revision 1.1 locked by: vishal;
date: 2015/02/07 16:45:36; author: vishal; state: Exp;
Initial revision
=============================================================================

RCS file: matrix.c,v
Working file: matrix.c
head: 1.5
branch:
locks: strict
vishal: 1.5
access list:
symbolic names:
keyword substitution: kv
total revisions: 5; selected revisions: 5
description:
Print matrix using double pointer and function.
—————————-
revision 1.5 locked by: vishal;
date: 2015/02/07 18:36:19; author: vishal; state: Exp; lines: +5 -2
Correct the for loop
—————————-
revision 1.4
date: 2015/02/07 18:12:45; author: vishal; state: Exp; lines: +5 -5
Update the arguments in the print function.
—————————-
revision 1.3
date: 2015/02/07 18:05:31; author: vishal; state: Exp; lines: +40 -20
Shift the memory allocation to the function.
Create a function to add the Two matrix using double pointer.
—————————-
revision 1.2
date: 2015/02/07 17:22:47; author: vishal; state: Exp; lines: +25 -7
Using double pointer to print the two matrix
—————————-
revision 1.1
date: 2015/02/07 16:45:36; author: vishal; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

Matrix using function and double pointer

RCS file: matrix.c,v
Working file: matrix.c
head: 1.1
branch:
locks: strict
vishal: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
Print matrix using double pointer and function.
—————————-
revision 1.1 locked by: vishal;
date: 2015/02/07 16:45:36; author: vishal; state: Exp;
Initial revision
=============================================================================RCS file: matrix.c,v

Posted in Uncategorized | Leave a comment

master array created and calculated the code length successfully.

 

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 all the header files.
----------------------------
revision 1.1	locked by: root;
date: 2015/02/07 16:08:36;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.8
branch:
locks: strict
	root: 1.8
access list:
symbolic names:
keyword substitution: kv
total revisions: 8;	selected revisions: 8
description:
It is a program for multiple data compression and encryption using iterative technique.
----------------------------
revision 1.8	locked by: root;
date: 2015/02/07 16:30:36;  author: root;  state: Exp;  lines: +1 -1
printf() statement is updated for printing cl.
';' is added.
----------------------------
revision 1.7
date: 2015/02/07 16:29:55;  author: root;  state: Exp;  lines: +16 -1
Calculated the code length for the master array.
----------------------------
revision 1.6
date: 2015/02/07 16:25:20;  author: root;  state: Exp;  lines: +1 -0
for loop is closed using '}' which was not closed earlier.
----------------------------
revision 1.5
date: 2015/02/07 16:23:15;  author: root;  state: Exp;  lines: +24 -8
Each new character read from a file is compared with each character in ma to store only the unique characters in the master array.
----------------------------
revision 1.4
date: 2015/02/07 16:18:28;  author: root;  state: Exp;  lines: +1 -1
printf statement is updated for printing the ma .
----------------------------
revision 1.3
date: 2015/02/07 16:16:24;  author: root;  state: Exp;  lines: +18 -2
Now i have copied the content of a file in a array named ma.
Initially i have allocated a memory for a single character using malloc().
After that i have reallocated a new memory for each new character using realloc function.
----------------------------
revision 1.2
date: 2015/02/07 16:11:02;  author: root;  state: Exp;  lines: +13 -1
I have opened a file using open function and command line arguments.
Also i have read the characters one by one from a file using read function in while loop.
----------------------------
revision 1.1
date: 2015/02/07 16:08:36;  author: root;  state: Exp;
Initial revision
=============================================================================

 

 

Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment

Circular Queue Empty and Full condition check algo

1. Create a Queue.
2. In write function
if(rp is less than fp)
{
write;
increment rp;
if(rp==fp)
printf(“queue full”);
}
3.In read function
if(rp is greater than fp)
{
read;
increment fp;
if(rp == fp)
printf(“queue empty”);
}

Posted in Data Structures with C | Leave a comment

Multiple data compression (Usinf function to reduce the execution time of the program also reduce the memory )

RCS file: mdc.c,v
Working file: mdc.c
head: 1.16
branch:
locks: strict
vishal: 1.16
access list:
symbolic names:
keyword substitution: kv
total revisions: 16; selected revisions: 16
description:
open the present file
And read the number of character in the file
This is done by using “header.h”
—————————-
revision 1.16 locked by: vishal;
date: 2015/02/06 15:39:55; author: vishal; state: Exp; lines: +47 -11
create the body of the function to open the file, to caluclate the number of bit compress
—————————-
revision 1.15
date: 2015/02/06 11:07:44; author: vishal; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.14
date: 2015/02/06 11:01:32; author: vishal; state: Exp; lines: +14 -2
*** empty log message ***
—————————-
revision 1.13
date: 2015/02/06 10:54:12; author: vishal; state: Exp; lines: +27 -7
*** empty log message ***
—————————-
revision 1.12
date: 2015/02/06 10:43:55; author: vishal; state: Exp; lines: +10 -5
comparess the two file simuntenouly
—————————-
revision 1.11
date: 2015/02/05 14:52:19; author: vishal; state: Exp; lines: +1 -1
correction of semicolon
—————————-
revision 1.10
date: 2015/02/05 14:51:17; author: vishal; state: Exp; lines: +19 -3
Find the number of bits data compressed by using if else ladder instead of while loop
—————————-
revision 1.9
date: 2015/02/05 14:43:55; author: vishal; state: Exp; lines: +1 -1
Find the number of bits data compressed
this is find by using for loop
—————————-
revision 1.8
date: 2015/02/05 14:24:33; author: vishal; state: Exp; lines: +20 -11
*** empty log message ***
—————————-
revision 1.7
date: 2015/02/05 12:16:36; author: vishal; state: Exp; lines: +17 -5
Compress the data by using for loop
print the number of character after comprassion
—————————-
revision 1.6
date: 2015/02/05 10:47:49; author: vishal; state: Exp; lines: +16 -7
correct of argv in “”
print the array save in the pointer
—————————-
revision 1.5
date: 2015/02/05 09:16:29; author: vishal; state: Exp; lines: +1 -1
correction if statement
—————————-
revision 1.4
date: 2015/02/05 09:14:35; author: vishal; state: Exp; lines: +2 -1
correction of malloc
print the copied string
—————————-
revision 1.3
date: 2015/02/05 09:05:38; author: vishal; state: Exp; lines: +17 -4
Store the data in the file in new pointer *ma
By using realloc
—————————-
revision 1.2
date: 2015/02/05 08:02:53; author: vishal; state: Exp; lines: +4 -4
This just the updatation of rcs file
—————————-
revision 1.1
date: 2015/02/04 18:15:38; author: vishal; state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.2
branch:
locks: strict
vishal: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
Update the rcs file
—————————-
revision 1.2 locked by: vishal;
date: 2015/02/06 15:36:09; author: vishal; state: Exp; lines: +3 -0
include the string function
also define the function to open the file
gave the function to calculate the length of data compress
design function to calculate number of bit compress
—————————-
revision 1.1
date: 2015/02/04 18:20:21; author: vishal; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

CREATING MASATER ARRAY

RCS file: mdc.c,v
Working file: mdc.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1; selected revisions: 1
description:
file compressing prg
—————————-
revision 1.1 locked by: root;
date: 2015/02/06 05:25:39; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

Created Master Array And Calculated Code length Without function in mdcaeuit

RCS file: mdcauit2.c,v
Working file: mdcauit2.c
head: 1.1
branch:
locks: strict
root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;    selected revisions: 1
description:
this is implementation of Multiple Data Compression And Encryption Using Iterative Technique.
It is without using functions.
—————————-
revision 1.1    locked by: root;
date: 2015/02/06 08:55:20;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.6
branch:
locks: strict
root: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6;    selected revisions: 6
description:
included base header file stdio.h
—————————-
revision 1.6    locked by: root;
date: 2015/02/05 12:00:24;  author: root;  state: Exp;  lines: +1 -0
declared the prototype of unique function.
—————————-
revision 1.5
date: 2015/02/05 07:22:43;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.4
date: 2015/02/05 07:20:30;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.3
date: 2015/02/02 09:24:15;  author: root;  state: Exp;  lines: +1 -1
*** empty log message ***
—————————-
revision 1.2
date: 2015/02/02 09:19:50;  author: root;  state: Exp;  lines: +2 -0
included stdio.h and fcntl.h
—————————-
revision 1.1
date: 2015/02/02 09:15:02;  author: root;  state: Exp;
Initial revision
=============================================================================

Posted in Uncategorized | Leave a comment

Created the Master Array and Calculated Code Length without using functions

RCS file: mdcaeuit.c,v
Working file: mdcaeuit.c
head: 1.12
branch:
locks: strict
	root: 1.12
access list:
symbolic names:
keyword substitution: kv
total revisions: 12;	selected revisions: 12
description:
In this program, multiple files are compressed nd encrypted by using iterative technique
----------------------------
revision 1.12	locked by: root;
date: 2015/02/05 11:59:21;  author: root;  state: Exp;  lines: +59 -26
inplemented master array 
calculated code length 
by using unique function
----------------------------
revision 1.11
date: 2015/02/05 09:08:19;  author: root;  state: Exp;  lines: +17 -9
nw we r inserting distinct characters into the master array.
by introducing flags .
----------------------------
revision 1.10
date: 2015/02/05 07:18:09;  author: root;  state: Exp;  lines: +4 -0
*** empty log message ***
----------------------------
revision 1.9
date: 2015/02/02 10:14:01;  author: root;  state: Exp;  lines: +3 -1
*** empty log message ***
----------------------------
revision 1.8
date: 2015/02/02 10:09:30;  author: root;  state: Exp;  lines: +6 -2
created the master array 
allocated the memory nd then reallocated it by using ndc variable 
basically we r writing character by character into the master array i.e ma
----------------------------
revision 1.7
date: 2015/02/02 09:48:27;  author: root;  state: Exp;  lines: +4 -1
*** empty log message ***
----------------------------
revision 1.6
date: 2015/02/02 09:43:19;  author: root;  state: Exp;  lines: +3 -0
just added break 
;
----------------------------
revision 1.5
date: 2015/02/02 09:41:34;  author: root;  state: Exp;  lines: +1 -1
just added ch
----------------------------
revision 1.4
date: 2015/02/02 09:39:45;  author: root;  state: Exp;  lines: +1 -1
added \n 
;
----------------------------
revision 1.3
date: 2015/02/02 09:37:32;  author: root;  state: Exp;  lines: +2 -1
we have printed the character instead of count
----------------------------
revision 1.2
date: 2015/02/02 09:33:10;  author: root;  state: Exp;  lines: +9 -2
now we are Reading the no of bytes containing the textfile
----------------------------
revision 1.1
date: 2015/02/02 09:14:36;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.3
branch:
locks: strict
	root: 1.3
access list:
symbolic names:
keyword substitution: kv
total revisions: 3;	selected revisions: 3
description:
in this we have included base header file stdio.h
----------------------------
revision 1.3	locked by: root;
date: 2015/02/05 12:00:30;  author: root;  state: Exp;  lines: +1 -0
added the decleration or prototype of unique function
----------------------------
revision 1.2
date: 2015/02/02 09:20:19;  author: root;  state: Exp;  lines: +2 -1
In this we have included two header files 
i.e
stdlib.h nd fcntl.h
----------------------------
revision 1.1
date: 2015/02/02 09:14:53;  author: root;  state: Exp;
Initial revision
=============================================================================

RCS file: mdcaeuit1.c,v
Working file: mdcaeuit1.c
head: 1.1
branch:
locks: strict
	root: 1.1
access list:
symbolic names:
keyword substitution: kv
total revisions: 1;	selected revisions: 1
description:
implementayion of multiple data compression and encryption using iterative technique.
in this we have created master array without using functions.
----------------------------
revision 1.1	locked by: root;
date: 2015/02/06 08:54:58;  author: root;  state: Exp;
Initial revision
=============================================================================
Posted in Uncategorized | Leave a comment

I creat master array using function

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:
header file for mdc.c
—————————-
revision 1.1 locked by: root;
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.6
branch:
locks: strict
root: 1.6
access list:
symbolic names:
keyword substitution: kv
total revisions: 6; selected revisions: 6
description:
This is multiple data compression and encription using iterative techniqe project
open file text in rea.
—————————-
revision 1.6 locked by: root;
date: 2015/02/02 09:04:40; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/02/02 09:01:27; author: root; state: Exp; lines: +9 -4
*** empty log message ***
—————————-
revision 1.4
date: 2015/02/02 08:59:49; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2015/02/02 08:55:44; author: root; state: Exp; lines: +8 -1
reading one character from file at a time and storing in array.
—————————-
revision 1.2
date: 2015/02/02 08:47:18; author: root; state: Exp; lines: +8 -0
argc is counted
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

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:
header file for mdc.c
—————————-
revision 1.1 locked by: root;
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.9
branch:
locks: strict
root: 1.9
access list:
symbolic names:
keyword substitution: kv
total revisions: 9; selected revisions: 9
description:
This is multiple data compression and encription using iterative techniqe project
open file text in rea.
—————————-
revision 1.9 locked by: root;
date: 2015/02/02 09:31:36; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.8
date: 2015/02/02 09:24:56; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/02/02 09:20:53; author: root; state: Exp; lines: +19 -5
creating master array
—————————-
revision 1.6
date: 2015/02/02 09:04:40; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/02/02 09:01:27; author: root; state: Exp; lines: +9 -4
*** empty log message ***
—————————-
revision 1.4
date: 2015/02/02 08:59:49; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2015/02/02 08:55:44; author: root; state: Exp; lines: +8 -1
reading one character from file at a time and storing in array.
—————————-
revision 1.2
date: 2015/02/02 08:47:18; author: root; state: Exp; lines: +8 -0
argc is counted
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

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:
header file for mdc.c
—————————-
revision 1.1 locked by: root;
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.13
branch:
locks: strict
root: 1.13
access list:
symbolic names:
keyword substitution: kv
total revisions: 13; selected revisions: 13
description:
This is multiple data compression and encription using iterative techniqe project
open file text in rea.
—————————-
revision 1.13 locked by: root;
date: 2015/02/05 08:41:41; author: root; state: Exp; lines: +13 -1
find th code length.
—————————-
revision 1.12
date: 2015/02/05 08:18:17; author: root; state: Exp; lines: +1 -0
print the length of ma
—————————-
revision 1.11
date: 2015/02/05 08:15:37; author: root; state: Exp; lines: +2 -2
change ma to buff
—————————-
revision 1.10
date: 2015/02/05 08:13:17; author: root; state: Exp; lines: +10 -1
find the length of master array.
store master array into encrypt_key file.
—————————-
revision 1.9
date: 2015/02/02 09:31:36; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.8
date: 2015/02/02 09:24:56; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/02/02 09:20:53; author: root; state: Exp; lines: +19 -5
creating master array
—————————-
revision 1.6
date: 2015/02/02 09:04:40; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/02/02 09:01:27; author: root; state: Exp; lines: +9 -4
*** empty log message ***
—————————-
revision 1.4
date: 2015/02/02 08:59:49; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2015/02/02 08:55:44; author: root; state: Exp; lines: +8 -1
reading one character from file at a time and storing in array.
—————————-
revision 1.2
date: 2015/02/02 08:47:18; author: root; state: Exp; lines: +8 -0
argc is counted
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: header.h,v
Working file: header.h
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
header file for mdc.c
—————————-
revision 1.4 locked by: root;
date: 2015/02/06 08:42:57; author: root; state: Exp; lines: +1 -0
define prototype for creat_master_array()
—————————-
revision 1.3
date: 2015/02/06 08:14:01; author: root; state: Exp; lines: +1 -0
define prototype for file_open()
—————————-
revision 1.2
date: 2015/02/06 08:05:19; author: root; state: Exp; lines: +1 -0
define prototype for code_length()
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

RCS file: mdc.c,v
Working file: mdc.c
head: 1.24
branch:
locks: strict
root: 1.24
access list:
symbolic names:
keyword substitution: kv
total revisions: 24; selected revisions: 24
description:
This is multiple data compression and encription using iterative techniqe project
open file text in rea.
—————————-
revision 1.24 locked by: root;
date: 2015/02/06 08:50:00; author: root; state: Exp; lines: +2 -0
*** empty log message ***
—————————-
revision 1.23
date: 2015/02/06 08:44:42; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.22
date: 2015/02/06 08:42:31; author: root; state: Exp; lines: +30 -21
implement creat_master_array()
—————————-
revision 1.21
date: 2015/02/06 08:31:57; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.20
date: 2015/02/06 08:30:38; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.19
date: 2015/02/06 08:27:58; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.18
date: 2015/02/06 08:22:41; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.17
date: 2015/02/06 08:15:26; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.16
date: 2015/02/06 08:13:26; author: root; state: Exp; lines: +14 -7
implement file_open()
—————————-
revision 1.15
date: 2015/02/06 08:06:10; author: root; state: Exp; lines: +1 -0
define cl
—————————-
revision 1.14
date: 2015/02/06 08:04:57; author: root; state: Exp; lines: +12 -6
implement code_length()
—————————-
revision 1.13
date: 2015/02/05 08:41:41; author: root; state: Exp; lines: +13 -1
find th code length.
—————————-
revision 1.12
date: 2015/02/05 08:18:17; author: root; state: Exp; lines: +1 -0
print the length of ma
—————————-
revision 1.11
date: 2015/02/05 08:15:37; author: root; state: Exp; lines: +2 -2
change ma to buff
—————————-
revision 1.10
date: 2015/02/05 08:13:17; author: root; state: Exp; lines: +10 -1
find the length of master array.
store master array into encrypt_key file.
—————————-
revision 1.9
date: 2015/02/02 09:31:36; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.8
date: 2015/02/02 09:24:56; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.7
date: 2015/02/02 09:20:53; author: root; state: Exp; lines: +19 -5
creating master array
—————————-
revision 1.6
date: 2015/02/02 09:04:40; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.5
date: 2015/02/02 09:01:27; author: root; state: Exp; lines: +9 -4
*** empty log message ***
—————————-
revision 1.4
date: 2015/02/02 08:59:49; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.3
date: 2015/02/02 08:55:44; author: root; state: Exp; lines: +8 -1
reading one character from file at a time and storing in array.
—————————-
revision 1.2
date: 2015/02/02 08:47:18; author: root; state: Exp; lines: +8 -0
argc is counted
—————————-
revision 1.1
date: 2015/02/02 08:35:46; author: root; state: Exp;
Initial revision
=============================================================================

Posted in Project 2: Multiple Data Compression and Encryption | Leave a comment

Using sigaction() as a replacement of signal().

Signal is a very important call to handle the behavior of any in coming signals as we know as default signal terminate the process but using signal() we can make the signal do according to need by running a function called signal handler. but what if another signal came during the execution of that signal handler than by default, the process get terminate(if the handler is not written for that signal) and if the same signal came ,the handler program restarts after completing itself. means it limited for multiple signals in a process. This problem overcame by sigaction() call. It also works as signal() but it has some extra features so that it can handle upcoming signal by placing in a queue when the execution of the first signal complete it take the next signal and run the definition. sigaction() is a kernel data structure. sigaction() can mask a signal during the execution of first signal. we can also have information about the signal that why and where it is coming from.
basic structure of sigaction is,
struct sigaction {
1 void (*sa_handler)(int);
2 void (*sa_sigaction)(int, siginfo_t *, void *);
3 sigset_t sa_mask;
4 int sa_flags;
5 void (*sa_restorer)(void);
};
1. first is the normal signal which contain signal number and handler.
2. it is the new handler which has signal number , signal info why and from where it is coming from, and user context to supply handler at run time.
3. signal mask is to mask another or upcoming signal.
4. sa_flag is equal to siginfo_t , it is used to run siginfo properly.

because sigaction has these extra option , it can be used enhanced signal purpose.

Posted in Project 03: Client Server Communication using Linux and IPC | Leave a comment