loader_f2.c


#include <stdio.h>
#include <stdlib.h>
#include <string.h>


char stringCom[70] = {"mpc add "};
char stringClear[10] = {"mpc clear"};
char *sourceP, *distiP;
char source[60];
char ch;
int count;
int test;

int main (void)
{
FILE *fp = fopen("/boot/netrd.txt", "r");
if(fp == NULL)
        {
         perror("Unable to open file!");
         exit(1);
        }
system(stringClear);
for (count = 1; count < 10; count++)
        {
        sourceP = source;
        while((test = fgetc(fp)) != 13)//read file
                {
                ch = test;
                *sourceP = ch;
                sourceP++;
                }
        *sourceP = '\0';//string ends
        if (count > 1)
                source[0] = ' ';//Removes lineshift
        sourceP = source;
        distiP = stringCom;//mpc add
        distiP = distiP + 8;
        while (*sourceP != 0)//add URL to mpc add
                {
                *distiP = *sourceP;
                sourceP++;
                distiP++;
                }
        *distiP = 0;
        system(stringCom);
        }
fclose(fp);
return 0;
}


Compile med:   g++ -o loader_f2 loader_f2.c

Bemærk: dette er ekspermentel software der er ingen garanti for brugbarhed, det kan derimod sandsynligvis være skadeligt, kun til brug i Danmark.