#include <stdio.h>
int main()
{
int year;
printf(“enter year\n”);
scanf(“%d”, &year);
if(year % 4==0 || year % 100== 0)
printf(“it is leap year\n”);
else
printf(“it is non leap year\n”);
return 0;
}
#include <stdio.h>
int main()
{
int year;
printf(“enter year\n”);
scanf(“%d”, &year);
if(year % 4==0 || year % 100== 0)
printf(“it is leap year\n”);
else
printf(“it is non leap year\n”);
return 0;
}
#include <stdio.h>
int main()
{
int a,i;
printf(“enter a number\n”);
scanf(“%d”, &a);
for (i=0;i<=a;i++)
{
a=a/2;
}
if (a%2==0)
printf(“it is power of 2\n”);
else
printf(“it is not\n”);
return 0;
}
#include<stdio.h>
int main()
{
char i;
printf(“Enter the value of i”);
scanf(“%c”,&i);
switch(i)
{
case ’0′:
printf(“Black”);
break;
case ’1′:
printf(“brown”);
break;
case ’2′:
printf(“Red”);
break;
case ’3′:
printf(“Orange”);
break;
case ’4′:
printf(“Yellow”);
break;
case ’5′:
printf(“Green”);
break;
case ’6′:
printf(“Grey”);
}
return 0;
}
RCS file: projectmdc.c,v
Working file: projectmdc.c
head: 1.15
branch:
locks: strict
root: 1.15
access list:
symbolic names:
keyword substitution: kv
total revisions: 15; selected revisions: 15
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.15 locked by: root;
date: 2015/02/14 12:39:24; author: root; state: Exp; lines: +110 -46
done with 4 bit compression
create compressed_data() and pass 2 copy of arguement.
file discriptor and second pass the master array
read file and compare with master array index
previously using printf but compression is not done properly
then simply convert integer to character
and write the compressed and encrypted data into compressed_data file successfully.
----------------------------
revision 1.14
date: 2015/02/12 13:07:03; author: root; state: Exp; lines: +8 -0
*** empty log message ***
----------------------------
revision 1.13
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: 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:
opening
a file
----------------------------
revision
1.3
locked
by: root;
date:
2015/02/14 10:51:24; author: root; state: Exp; lines: +25 -13
find
the compressed data
----------------------------
revision
1.2
date:
2015/02/14 09:58:30; author: root; state: Exp; lines: +47 -2
inserting
distinct characters from textfile into master array
----------------------------
revision
1.1
date:
2015/02/13 15:27:34; author: root; state: Exp;
Initial
revision
=============================================================================
RCS file: mdcauit2.c,v
Working file: mdcauit2.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
this is implementation of Multiple Data Compression And Encryption Using Iterative Technique.
It is without using functions.
—————————-
revision 1.4 locked by: root;
date: 2015/02/14 04:40:58; author: root; state: Exp; lines: +23 -17
Eliminating the null character that was stored extra in decompressed file.
—————————-
revision 1.3
date: 2015/02/13 10:42:01; author: root; state: Exp; lines: +39 -10
Using decompression function to decompress the file.
Implemented successfully.
—————————-
revision 1.2
date: 2015/02/12 11:16:09; author: root; state: Exp; lines: +51 -1
Using Compression function to compress the Textfile.
implemented successfully and created compressed file.
—————————-
revision 1.1
date: 2015/02/06 08:55:20; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: mdcauit2.c,v
Working file: mdcauit2.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
this is implementation of Multiple Data Compression And Encryption Using Iterative Technique.
It is without using functions.
—————————-
revision 1.4 locked by: root;
date: 2015/02/14 04:40:58; author: root; state: Exp; lines: +23 -17
Eliminating the null character that was stored extra in decompressed file.
—————————-
revision 1.3
date: 2015/02/13 10:42:01; author: root; state: Exp; lines: +39 -10
Using decompression function to decompress the file.
Implemented successfully.
—————————-
revision 1.2
date: 2015/02/12 11:16:09; author: root; state: Exp; lines: +51 -1
Using Compression function to compress the Textfile.
implemented successfully and created compressed file.
—————————-
revision 1.1
date: 2015/02/06 08:55:20; author: root; state: Exp;
Initial revision
=============================================================================
RCS file: merge.c,v
Working file: merge.c
head: 1.2
branch:
locks: strict
prachisinghal: 1.2
access list:
symbolic names:
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
merge two arrays using pointer.
----------------------------
revision 1.2 locked by: prachisinghal;
date: 2015/02/13 08:08:21; author: prachisinghal; state: Exp; lines: +2 -2
*** empty log message ***
----------------------------
revision 1.1
date: 2015/02/13 07:52:22; author: prachisinghal; 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:
file compressing prg
—————————-
revision 1.9 locked by: root;
date: 2015/02/13 07:28:40; author: root; state: Exp; lines: +2 -2
readinn another varible and compare it to the master arry and put into the varible
then throw sprintf we convert into char
fist we left shift it the right shift
and both two byt varible captured into a third vrible
print the third varible
—————————-
revision 1.8
date: 2015/02/13 07:25:32; author: root; state: Exp; lines: +83 -29
here we read the file again and take while loop
after this we compare the master array variable to the file content
after find take it in a varible and convert into character
after it shifts leftside
—————————-
revision 1.7
date: 2015/02/12 00:48:40; author: root; state: Exp; lines: +2 -2
hare we find the code length
and comparing the code length
—————————-
revision 1.6
date: 2015/02/12 00:46:01; author: root; state: Exp; lines: +5 -5
if the character is not match then realloc the the size of master array
and the character is stored in the master array
and increase the ndc
and also increase the varible comparing wid i
—————————-
revision 1.5
date: 2015/02/12 00:43:19; author: root; state: Exp; lines: +5 -2
here we use the whilr loop for count the number of character
and also use to match the distungih char to the master aarry
if it macht then the loop is going outside
—————————-
revision 1.4
date: 2015/02/12 00:41:17; author: root; state: Exp; lines: +2 -2
hera we read the file and each character of file is assign to master array
—————————-
revision 1.3
date: 2015/02/12 00:38:47; author: root; state: Exp; lines: +2 -2
declaring main fumction and also declaring a char varinbland declaring a master arry ,,and open the file wid file descrptor fd
—————————-
revision 1.2
date: 2015/02/12 00:35:50; author: root; state: Exp; lines: +13 -5
here we include the required header file and declare the variable flobally
—————————-
revision 1.1
date: 2015/02/06 05:25:39; author: root; state: Exp;
Initial revision
RCS file: mdc.c,v
Working file: mdc.c
head: 1.4
branch:
locks: strict
root: 1.4
access list:
symbolic names:
keyword substitution: kv
total revisions: 4; selected revisions: 4
description:
This is the base file for mdc project….
—————————-
revision 1.4 locked by: root;
date: 2015/02/13 10:31:50; author: root; state: Exp; lines: +83 -8
MASTER ARRAY HAS BEEN CREATED AND CODE LENGTH HAS BEEN CALCULATED
HERE 4 BIT COMPRESSION HAS BEEN PERFORMED
COMPRESSED DATA IS STORED IN A SEPARATE FILE COMPRESS.TXT.
—————————-
revision 1.3
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
=============================================================================
RCS file: mdcauit2.c,v
Working file: mdcauit2.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 implementation of Multiple Data Compression And Encryption Using Iterative Technique.
It is without using functions.
—————————-
revision 1.2 locked by: root;
date: 2015/02/12 11:16:09; author: root; state: Exp; lines: +51 -1
Using Compression function to compress the Textfile.
implemented successfully and created compressed file.
—————————-
revision 1.1
date: 2015/02/06 08:55:20; 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:
included base header file stdio.h
—————————-
revision 1.7 locked by: root;
date: 2015/02/12 11:13:28; author: root; state: Exp; lines: +5 -1
declared the prototype for comprssion function.
declared the prototype for finding the location of element.
—————————-
revision 1.6
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
=============================================================================
RCS file: header.h,v Working file: header.h head: 1.2 branch: locks: strict root: 1.2 access list: symbolic names: keyword substitution: kv total revisions: 2; selected revisions: 2 description: in this we have included base header file stdio.h ---------------------------- revision 1.2 locked by: root; 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: mdcaeuit.c,v Working file: mdcaeuit.c head: 1.9 branch: locks: strict root: 1.9 access list: symbolic names: keyword substitution: kv total revisions: 9; selected revisions: 9 description: In this program, multiple files are compressed nd encrypted by using iterative technique ---------------------------- revision 1.9 locked by: root; 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: 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 ============================================================================= 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: 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.4 branch: locks: strict root: 1.4 access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: in this we have included base header file stdio.h ---------------------------- revision 1.4 locked by: root; date: 2015/02/12 11:13:04; author: root; state: Exp; lines: +8 -4 in this we have decleared the prototype of different different compression functions that we have used to compress the textfile. nd also decleared the prototype for finding the location also ---------------------------- revision 1.3 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: 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
=============================================================================
RCS file: header.h,v
Working file: header.h
head: 1.8
branch:
locks: strict
root: 1.8
access list:
symbolic names:
keyword substitution: kv
total revisions: 8; selected revisions: 8
description:
header file for mdc.c
—————————-
revision 1.8 locked by: root;
date: 2015/02/10 15:22:18; author: root; state: Exp; lines: +1 -0
define prototype for decompress()
—————————-
revision 1.7
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.95
branch:
locks: strict
root: 1.95
access list:
symbolic names:
keyword substitution: kv
total revisions: 95; selected revisions: 95
description:
This is multiple data compression and encription using iterative techniqe project
open file text in rea.
—————————-
revision 1.95 locked by: root;
date: 2015/02/12 09:58:20; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.94
date: 2015/02/12 09:00:32; author: root; state: Exp; lines: +2 -1
*** empty log message ***
—————————-
revision 1.93
date: 2015/02/12 08:55:36; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.92
date: 2015/02/12 08:16:17; author: root; state: Exp; lines: +3 -5
*** empty log message ***
—————————-
revision 1.91
date: 2015/02/12 08:15:04; author: root; state: Exp; lines: +7 -13
*** empty log message ***
—————————-
revision 1.90
date: 2015/02/12 08:13:46; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.89
date: 2015/02/12 08:11:41; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.88
date: 2015/02/12 08:09:38; author: root; state: Exp; lines: +14 -8
*** empty log message ***
—————————-
revision 1.87
date: 2015/02/12 06:03:02; author: root; state: Exp; lines: +13 -6
*** empty log message ***
—————————-
revision 1.86
date: 2015/02/12 06:02:04; author: root; state: Exp; lines: +4 -9
*** empty log message ***
—————————-
revision 1.85
date: 2015/02/12 06:01:13; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.84
date: 2015/02/12 06:00:26; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.83
date: 2015/02/12 05:58:50; author: root; state: Exp; lines: +14 -6
*** empty log message ***
—————————-
revision 1.82
date: 2015/02/12 05:56:32; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.81
date: 2015/02/12 05:56:08; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.80
date: 2015/02/12 05:54:57; author: root; state: Exp; lines: +1 -3
*** empty log message ***
—————————-
revision 1.79
date: 2015/02/12 05:46:42; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.78
date: 2015/02/12 05:45:12; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.77
date: 2015/02/12 05:44:56; author: root; state: Exp; lines: +14 -7
*** empty log message ***
—————————-
revision 1.76
date: 2015/02/12 05:39:57; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.75
date: 2015/02/12 05:38:57; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.74
date: 2015/02/12 05:38:30; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.73
date: 2015/02/12 05:37:30; author: root; state: Exp; lines: +2 -1
*** empty log message ***
—————————-
revision 1.72
date: 2015/02/12 05:34:14; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.71
date: 2015/02/12 05:33:00; author: root; state: Exp; lines: +2 -2
*** empty log message ***
—————————-
revision 1.70
date: 2015/02/12 05:32:36; author: root; state: Exp; lines: +7 -2
*** empty log message ***
—————————-
revision 1.69
date: 2015/02/12 05:28:48; author: root; state: Exp; lines: +1 -4
*** empty log message ***
—————————-
revision 1.68
date: 2015/02/12 05:24:44; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.67
date: 2015/02/12 05:21:00; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.66
date: 2015/02/12 05:19:53; author: root; state: Exp; lines: +2 -3
*** empty log message ***
—————————-
revision 1.65
date: 2015/02/12 05:17:52; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.64
date: 2015/02/10 16:10:40; author: root; state: Exp; lines: +3 -3
*** empty log message ***
—————————-
revision 1.63
date: 2015/02/10 16:09:15; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.62
date: 2015/02/10 16:07:12; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.61
date: 2015/02/10 16:04:56; author: root; state: Exp; lines: +2 -0
*** empty log message ***
—————————-
revision 1.60
date: 2015/02/10 16:04:19; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.59
date: 2015/02/10 16:03:47; author: root; state: Exp; lines: +2 -1
*** empty log message ***
—————————-
revision 1.58
date: 2015/02/10 16:02:17; author: root; state: Exp; lines: +2 -0
*** empty log message ***
—————————-
revision 1.57
date: 2015/02/10 15:59:25; author: root; state: Exp; lines: +2 -4
*** empty log message ***
—————————-
revision 1.56
date: 2015/02/10 15:55:38; author: root; state: Exp; lines: +3 -12
*** empty log message ***
—————————-
revision 1.55
date: 2015/02/10 15:53:37; author: root; state: Exp; lines: +3 -2
*** empty log message ***
—————————-
revision 1.54
date: 2015/02/10 15:50:06; author: root; state: Exp; lines: +1 -3
*** empty log message ***
—————————-
revision 1.53
date: 2015/02/10 15:47:43; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.52
date: 2015/02/10 15:47:05; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.51
date: 2015/02/10 15:44:23; author: root; state: Exp; lines: +1 -0
*** empty log message ***
—————————-
revision 1.50
date: 2015/02/10 15:42:14; author: root; state: Exp; lines: +11 -4
*** empty log message ***
—————————-
revision 1.49
date: 2015/02/10 15:34:03; author: root; state: Exp; lines: +2 -1
*** empty log message ***
—————————-
revision 1.48
date: 2015/02/10 15:31:10; author: root; state: Exp; lines: +2 -3
*** empty log message ***
—————————-
revision 1.47
date: 2015/02/10 15:27:49; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.46
date: 2015/02/10 15:25:05; author: root; state: Exp; lines: +12 -8
*** empty log message ***
—————————-
revision 1.45
date: 2015/02/10 15:22:55; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.44
date: 2015/02/10 15:21:51; author: root; state: Exp; lines: +16 -0
implement decompress()
—————————-
revision 1.43
date: 2015/02/10 15:04:05; author: root; state: Exp; lines: +1 -1
*** empty log message ***
—————————-
revision 1.42
date: 2015/02/10 15:03:26; author: root; state: Exp; lines: +5 -3
*** empty log message ***
—————————-
revision 1.41
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
=============================================================================
RCS file: mdc.c,v
Working file: mdc.c
head: 1.7
branch:
locks: strict
root: 1.7
access list:
symbolic names:
keyword substitution: kv
total revisions: 7; selected revisions: 7
description:
file compressing prg
—————————-
revision 1.7 locked by: root;
date: 2015/02/12 00:48:40; author: root; state: Exp; lines: +2 -2
hare we find the code length
and comparing the code length
—————————-
revision 1.6
date: 2015/02/12 00:46:01; author: root; state: Exp; lines: +5 -5
if the character is not match then realloc the the size of master array
and the character is stored in the master array
and increase the ndc
and also increase the varible comparing wid i
—————————-
revision 1.5
date: 2015/02/12 00:43:19; author: root; state: Exp; lines: +5 -2
here we use the whilr loop for count the number of character
and also use to match the distungih char to the master aarry
if it macht then the loop is going outside
—————————-
revision 1.4
date: 2015/02/12 00:41:17; author: root; state: Exp; lines: +2 -2
hera we read the file and each character of file is assign to master array
—————————-
revision 1.3
date: 2015/02/12 00:38:47; author: root; state: Exp; lines: +2 -2
declaring main fumction and also declaring a char varinbland declaring a master arry ,,and open the file wid file descrptor fd
—————————-
revision 1.2
date: 2015/02/12 00:35:50; author: root; state: Exp; lines: +13 -5
here we include the required header file and declare the variable flobally
—————————-
revision 1.1
date: 2015/02/06 05:25:39; author: root; state: Exp;
Initial revision
=============================================================================
First of all lets see what a signal is. A signal is a software interrupt sent by the kernel to a foreground process to report an exceptional situation or report a case where the process is trying to access an invalid memory location ( e.g. a segmentation fault is reported after SIGSEGV signal is generated when we try to access an invalid location) or any other asynchronous event.
There are a total of 64 signals defined in Linux. These have been divided into various sections :
All these are defined in header file signal.h.
When generated these signals would execute there default behavior. But we can change this by redefining what the signal should do when its generated. This new definition is called a handler.
NOTE : SIGKILL and SIGSTOP can’t be caught or handled.
The signal system call – int signal(int signum, sighandler_t handler) is used to register a signal handler which would be invoked when the signum signal is generated.
Using signal() system call has some major drawbacks, of which the most significant is that its behavior varies across different versions of UNIX and Linux. Others include:
So, I think its safe to say that signal() is a fairly primitive and unsafe way to handle incoming signals.
Contrary to signal(), sigaction() provides a vast variety of options while handling signals but, with added complexity.
This is the prototype for sigaction() system call – int sigaction(int signum, const struct sigaction *act, struct sigaction *oldact)
The 1st argument takes the signal which is to be handled, the 3rd argument is used to define the previous behavior of the signal. The 2nd argument is a pointer to sigaction which is a kernel data structure its defined as:
struct sigaction {
void (*sa_handler)(int);
void (*sa_sigaction)(int, siginfo_t *, void *);
sigset_t sa_mask;
int sa_flags;
void (*sa_restorer)(void);
};
– sa_handler specifies the action to be associated with signum. This function receives the signal no. as its only argument.
– Parameters in sa_sigaction i.e void* is used to send arguments to the handler and siginfo_t is a structure which gives information about the whereabouts of the signal and other critical information. Its defined as:
siginfo_t {
int si_signo; /* Signal number */
int si_errno; /* An errno value */
int si_code; /* Signal code */
int si_trapno; /* Trap number that caused
hardware-generated signal
(unused on most architectures) */
pid_t si_pid; /* Sending process ID */
uid_t si_uid; /* Real user ID of sending process */
int si_status; /* Exit value or signal */
clock_t si_utime; /* User time consumed */
clock_t si_stime; /* System time consumed */
sigval_t si_value; /* Signal value */
int si_int; /* POSIX.1b signal */
void *si_ptr; /* POSIX.1b signal */
int si_overrun; /* Timer overrun count; POSIX.1b timers */
int si_timerid; /* Timer ID; POSIX.1b timers */
void *si_addr; /* Memory location which caused fault */
long si_band; /* Band event (was int in
glibc 2.3.2 and earlier) */
int si_fd; /* File descriptor */
short si_addr_lsb; /* Least significant bit of address
(since kernel 2.6.32) */
}
– sigset_t sa_mask is a set of signals to be blocked during execution of the signal handler. This is called signal masking. The blocked signals are sent to the sigpending queue, sigpending is a kernel structure defined in signal.h which is used to queue all the signals raised in the kernel space and are blocked in the user space.
– sa_flags specify a set of flags which modify the behavior of the signal. For e.g. if SA_SIGINFO then sa_sigaction specifies the signal handling function for signum not sa_handler. This is used when we want to define our own handler. List of all the flags is :
– sa_restorer should not be by the user, its used internally by the Linux kernel while handling a pending unblocked signal.
Its quiet obvious that sigaction() allows more precise and safe handling of signals along with portability and takes care of the anomalies or loop holes created while using signal() system call.