void write_deletion(D_RECORD *record, FILE *outfile)
{
fputc(record->type,outfile);
fputc(record->code[0],outfile);
fputc(record->code[1],outfile);
fputc(record->code[2],outfile);...
Type: Posts; User: Heraclitus
void write_deletion(D_RECORD *record, FILE *outfile)
{
fputc(record->type,outfile);
fputc(record->code[0],outfile);
fputc(record->code[1],outfile);
fputc(record->code[2],outfile);...
/* Create a "proper" buffer ;) */
char string[640K_OUGHT_TO_BE_ENOUGH_FOR_ANYBODY];
fgets(string,sizeof(string),stdin);
strtok(string,"\n"); /* Will replace the first newline in string with a...
/* No need for conditional tests, just initialise a char array with the values that you wish to use. No need to worry about ASCII codes. */
const char array[] =...
struct sizes
{
int e_size;
};
struct sizes headersizes = {(int)sizeof(struct ethhdr)};
...
int main...
You may want to look into XOR encryption, it is very simple, yet highly effective.
The basic idea is:
char ^ key_val = encrypted_char
Coincidently, I wrote a simple program that implements this...
Thanks for the reply man, but I have just found out what the problem was: no "fflush(stdout);". I kicked myself after realising that I overlooked this. :)
I have made a little program that works similar to cat, but it also decrypts/encrypts the stream, as well as printing to stdout. It does this by simple XOR encryption.
/* XOR each character in...
The reason for the numbers being the same, if I am not mistaken, is due to the fact that srand(time(NULL)) will set the random seed using the system time (in seconds). As you are calling it twice in...