Re: [AD] crash! unhandled exception wip414 win2k msvc

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> The problem didn't occur with WIP 4.1.5 itself - it was only when I
> replaced the wddwin.c file with your new version and typed 'make' again,
> that the 'unable to open include file' message came up. But, it was
> probably something I did wrong so I wouldn't worry too much.

I posted the file from my Linux box, so it may be in Unix text encoding 
format. Do you have the DJGPP utod conversion utility ? If no, I've attached 
an equivalent source code.

-- 
Eric Botcazou
/* utod.c: convert Unix text file format into DOS text file format
 * by Eric Botcazou
 * 08/06/2002
 */

#include <stdio.h>

#define TEMPFILE "temp.utod"


int process_file(const char *filename)
{
   FILE *infile, *outfile;
   int c, last_c = 0;

   infile = fopen(filename, "rb");
   if (!infile)
      return 1;

   outfile = fopen(TEMPFILE, "wb");
   if (!outfile)
      return 1;

   while ((c = fgetc(infile)) != EOF) {
      if ((c == '\n') && (last_c != '\r'))
         fputc('\r', outfile);

      fputc(c, outfile);
      last_c = c;
   }

   fclose(outfile);
   fclose(infile);

   remove(filename);
   rename(TEMPFILE, filename);

   return 0;
}


int main(int argc, char *argv[])
{
   int i;

   for (i=0; i<argc; i++) {
       if (process_file(argv[i]) != 0)
          fprintf(stderr, "unable to process %s\n", argv[i]);
   }

   return 0;
}


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/