summaryrefslogtreecommitdiffstats
path: root/Bachelor/Mikroprozessorsysteme2/ARM202U/EXAMPLES/SCATTER/MAIN.C
blob: 7b90bc03fdfe52ece7b970ee19a1f5c880870e83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <stdio.h>
#include <string.h>
#define INBUFFSIZE 192
#define OUTBUFFSIZE 257

static char IDstring[]="This is initailised data.";
static char inBuff[INBUFFSIZE];
static char outBuff[OUTBUFFSIZE];
static int charCount=0;

extern int getData(char *,int);
extern int uuencode(char *, char *, int);

int main(int argc,char **argv)
{
	int uuCount;
	charCount = getData(inBuff,sizeof(inBuff));
	if (charCount<0) {
		fprintf(stderr,"Error reading data.\n");
	}
	else {
		uuCount=uuencode(inBuff,outBuff,charCount);
		outBuff[uuCount]='\0';
		puts(outBuff);
	}
	return 0;
}

void MemCopy(void *d,void *s,int c)
{
	memmove(d,s,c);
}