Hi, I'm having another episode with function parameters, but I've included the source files.
Thanks for your help.
Code:/* Write - This module writes an array of 60 converted characters into */ /* the output file generated by the software. */ #include <stdio.h> void Write (FILE **PtrfilePtr, const char *Chargroup) char Character; while (Index < 60) { { int Index = 0; Character = Chargroup[Index]; putc(Character, *PtrfilePtr); } putc("|", *PtrfilePtr); }
Code:/* Convert.c - This module is the main loop of the conversion engine. */ /* It fills an array of 60 characters amd converts and */ /* writes the encrypted characters. */ #include <stdio.h> /* Convert() - Read a group of 60 characters. */ void Convert(FILE **InfilePtr, FILE **OutfilePtr) { int Character, Index; char Chargroup[59]; Index = 0; Character = getc(*InfilePtr); while (Character != EOF) { Chargroup[Index] = Character; if (Index == 59) { Write(*OutfilePtr, Chargroup); Index = 0; } else { Index ++; } Character = getc(*InfilePtr); } printf("%s", Chargroup); }



LinkBack URL
About LinkBacks


