#include #include #include #include #include "definitions.h" #include "net.h" #define COMMAND_LENGTH 80 /* max length of a command. */ int main() { int i=1; int status=FAILURE; int number_of_terminators=1; char *command=NULL; char **reply=NULL; /* float Alti, Lati, Long = 0; */ int MODE=0; if ((command = (char *) calloc(COMMAND_LENGTH, sizeof(char)))==NULL) { fprintf(stderr, "*ERROR* failed to allocate command buffer!"); fflush(stderr); exit(EXIT_FAILURE); } if ((reply = (char **) calloc(COMMAND_LENGTH, sizeof(char *))) == NULL) { fprintf(stderr, "*ERROR* failed to allocate command buffer!"); fflush(stderr); exit(EXIT_FAILURE); } for (i=0; i