ho creato nave.c e ora gira con una sola nave... come faccio ad adattarlo x far creare a random da zero a dieci navi?

#include "libporto.h"

char *get_merce ()
{
char *prodotto;
int valore;
srand (getpid());
valore = rand()%5 + 1;

switch(valore)
{
case 1:
prodotto = ("TABACCO");
break;

case 2:
prodotto = ("ACCIAIO");
break;

case 3:
prodotto = ("FERRO");
break;

case 4:
prodotto = ("AUTOMOBILI");
break;

case 5:
prodotto = ("BOMBE");
break;

deafult:
printf("errore \n");
break;
}
return prodotto;

}

int get_quantita()
{
int t;
srand(getpid());
t = rand()%120 + 1;
return t;
}


main()
{
int pid;
int n;
boat nave;

pid = fork();

if (!pid)
{
printf("Sono il figlio %d\n", getpid());
nave.identificatore = getpid();
nave.merce = get_merce();
nave.quantita = get_quantita();
printf("identificatore nave ---> %d \n", 1);
printf("merce contenuta sulla nave: %s \n", nave.merce);
printf("quantitÃ_ di merce contenuta sulla nave: %d \n", nave.quantita);
}

else
printf("padre %d\n", getppid());

n = wait(0);

if(n > 0)
printf("Terminato figlio %d\n", n);
}



e libporto.h

#ifndef molo
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/msg.h>
#include <unistd.h>
#define molo

typedef struct {
long type;
int npid;
char str[30];
} msg;

typedef struct {
int quantita;
char *merce;
int identificatore;
} boat;

#endif