char *getstr(void)
{
        unsigned char *dst;
        int c;
        if ((dst=(unsigned char *)malloc(1)) == NULL) return 0;
        dst[0]='\0';
        while((c = getchar()) != '\n')
        {
                if ((dst=(unsigned char *)realloc(dst, strlen(dst)+2)) == NULL)
                        return 0;
                sprintf(dst, "%s%c", dst, c);
        }
        return dst;
}

