C ordening

This commit is contained in:
Rens Pastoor
2025-05-27 23:26:28 +02:00
parent 39269a71a7
commit 517087ccc1
207 changed files with 0 additions and 4278 deletions

View File

@@ -0,0 +1,9 @@
#include "channel.h"
// add here includes, if needed
int channel_main(int argc, char* argv[])
{
//add your code here
return 0;
}

View File

@@ -0,0 +1,10 @@
#include "decode.h"
// add here includes, if needed
int decode_main(int argc, char* argv[])
{
//add your code here
return 0;
}

View File

@@ -0,0 +1,10 @@
#include "encode.h"
// add here includes, if needed
int encode_main(int argc, char* argv[])
{
//add your code here
return 0;
}

View File

@@ -0,0 +1,38 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "encode.h"
extern int encode_main(int argc, char* argv[]);
extern int channel_main(int argc, char* argv[]);
extern int decode_main(int argc, char* argv[]);
int main(int argc, char* argv[])
{
if (argc < 4)
{
printf("Please provide file name arguments:\n");
printf("[encode|channel|decode] inputfile outpfile\n\n");
printf("Example:\n");
printf("main encode input.txt output.txt\n");
exit(0);
}
printf("%s: %s --> %s\n", argv[1], argv[2], argv[3]);
if(strcmp("encode", argv[1]) == 0)
{
return encode_main(argc,argv);
}
else if(strcmp("channel", argv[1]) == 0)
{
return channel_main(argc,argv);
}
else if(strcmp("decode", argv[1]) == 0)
{
return decode_main(argc,argv);
}
return 0;
}