decipher.h - #define #define #define #define #define...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 #define MAXFILENMLEN 200 #define MAXFILELEN 5000 #define ALPHALEN 26 #define lowercasea 97 #define lowercasez 122 #define uppercaseA 65 #define uppercaseZ 90 void clearAll(char a[], char b[], char c[], char d[], char e[]) /* Resets all arrays to 0 */ { int i = 0 for (i = 0 { a[i] = b[i] = c[i] = 0 } for (i = 0 d[i] = 0 for (i = 0 e[i] = 0 } char getKey(char a[], char b[], char c) /* Obtains key filename and stores file into an array, b[] */ { FILE *fp int k = 0 printf("Please enter key filename: ") scanf("%s", a) fp = fopen (a, "r") if (fp == NULL) { printf("Error opening %s.\n", a) getchar() return(4) } fgets(b, ALPHALEN, fp) fclose(fp) for (k = 0 { b[k] = tolower(b[k]) } getchar() return(c) } char makeArray(char a[], char b[], char c) /* Reads filename and stores array it into an array, b[] */ { FILE *fp int i = 0, j = 0 if (c == 1) { printf("Please enter name of file to be decrypted: ") }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Sheet1 Page 2 if (c == 2) { printf("Please enter name of file to be encrypted: ") } scanf("%s", a)
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/01/2008 for the course EE 312 taught by Professor Shafer during the Spring '08 term at University of Texas at Austin.

Page1 / 8

decipher.h - #define #define #define #define #define...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online