char *ReadInput(char *filename)
{
    FILE *finput;
    long filesize, num;
    char *buffer;
    if ( ( finput = fopen(filename,"r") ) == 0 ) {
        fprintf(stderr,"%s: Cannot open file %s\n",axohelp,filename);
        exit(1);
    }
    if ( ( fseek(finput,0,SEEK_END) != 0 )
      || ( ( filesize = ftell(finput) ) < 0 )
      || ( fseek(finput,0,SEEK_SET) != 0 ) ) {
        fprintf(stderr,"%s: File error in file %s\n",axohelp,filename);
        exit(1);
    }
    if ( ( buffer = malloc((filesize+1)*sizeof(char)) ) == 0 ) {
        fprintf(stderr,"%s: Error allocating %ld bytes of memory",axohelp,filesize+1);
        exit(1);
    }
/*
        Assume character in file is 1 byte, which is true for all cases
        we currently encounter.
*/
    num = fread( buffer, 1, filesize, finput );
    if ( ferror(finput) ) {
        fprintf(stderr,"%s: Error reading file %s\n",axohelp,filename);
        exit(1);
    }
/*
        By definition, fread reads ALL the items specified, or it gets to
        end-of-file, or there is an error.
        It returns the actual number of items successfully read, which
        is less than the number given in the 3rd argument ONLY if a
        read error or end-of-file is encountered.
        We have already tested for an error.
        But num could legitimately be less than filesize, because of
        translation of CRLF to LF (on MSWindows with MSWindows text file).
*/
    buffer[num] = 0;
    fclose(finput);
    return(buffer);
}