#include "funciones.h"
#include "struct.h"
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv){
    if(argc<3){perror("Introduce mas datos"); exit(-1);}

    int (*pf) (const struct alumno *, const struct alumno *);
    int sentido=atoi(argv[1]);
    int tam=contarNumReg(argv[2]);
    struct alumno *alumnos;
    

    if (sentido==1){
        pf=&ordAsc;
    }else if(sentido==2){
        pf=&ordDes;
    }

    rellenarVectorBin(argv[2], &alumnos, tam);

    ordenacion (alumnos,tam,pf);

    free(alumnos);    
}