Re: [hypermail] Hypermail could not read windows formatted header and footer file

From: Peter C. McCluskey <pcm_at_rahul.net_at_hypermail-project.org>
Date: Thu, 8 Feb 2001 15:46:32 -0800 (PST)
Message-Id: <20010208234632.A42661DBD_at_foxtrot.rahul.net>

 harip_at_india.hp.com (Hari Prasad) writes:
> We are using Hypermail 2b30 on Windows NT and I faced this problem.
>
>Hypermail was not including my header and footer files. After
>debugging for some time, I noticed that the the 'getfilecontents'
>function
>in file.c was failing. When further investigated, I found that beacause
>of
>the windows format of the header and footer files, this function was
>failing.

 One change that might fix this is to replace the finfo.st_size in (retval + finfo.st_size) with the value returned by fread in this chunk of code:

        if (!fread(retval, (size_t) finfo.st_size, 1, infile)) {
            (void)fclose(infile);
            free(retval);
            return (NULL);
        }
        *(retval + finfo.st_size) = '\0';

 If that doesn't work, you could try changing the "r" to "rb" in the fopen at the start of getfilecontents.



Peter McCluskey | Fed up with democracy's problems? Examine Futarchy: http://www.rahul.net/pcm | http://hanson.gmu.edu/futarchy.pdf or .ps Received on Fri 09 Feb 2001 01:50:05 AM GMT

This archive was generated by hypermail 2.2.0 : Thu 22 Feb 2007 07:33:52 PM GMT GMT