#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; int UThrs, UTmin, UTsec, UTfra=0; float RA, DEC, DOME=0; float UThrsf=0, UTminf=0, UTsecf=0, UTfraf=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