25{
26 int result = libmpq__archive_open(&
mpq_a, filename, -1);
27 printf("Opening %s\n", filename);
28 if (result)
29 {
30 switch (result)
31 {
32 case LIBMPQ_ERROR_OPEN :
33 printf("Error opening archive '%s': Does file really exist?\n", filename);
34 break;
35 case LIBMPQ_ERROR_FORMAT :
36 printf("Error opening archive '%s': Bad file format\n", filename);
37 break;
38 case LIBMPQ_ERROR_SEEK :
39 printf("Error opening archive '%s': Seeking in file failed\n", filename);
40 break;
41 case LIBMPQ_ERROR_READ :
42 printf("Error opening archive '%s': Read error in archive\n", filename);
43 break;
44 case LIBMPQ_ERROR_MALLOC :
45 printf("Error opening archive '%s': Maybe not enough memory\n", filename);
46 break;
47 default:
48 printf("Error opening archive '%s': Unknown error\n", filename);
49 break;
50 }
51 return;
52 }
54}
mpq_archive_s * mpq_a
Definition: mpq_libmpq04.h:35
ArchiveSet gOpenArchives
Definition: mpq_libmpq.cpp:22