]> www.fi.muni.cz Git - evince.git/blobdiff - backend/dvi/mdvi-lib/font.c
[dvi] Add 'b' to fopen mode for w32 compatibility
[evince.git] / backend / dvi / mdvi-lib / font.c
index fedb7e78a595a580d8257c77f56971ce9f541d5f..0b3d04ba66a836294bcfc17e93e89d1ce00f1236 100644 (file)
@@ -16,6 +16,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
+#include <config.h>
 #include <stdlib.h>
 
 #include "mdvi.h"
@@ -35,7 +36,7 @@ int   font_reopen(DviFont *font)
 {
        if(font->in)
                fseek(font->in, (long)0, SEEK_SET);
-       else if((font->in = fopen(font->filename, "r")) == NULL) {
+       else if((font->in = fopen(font->filename, "rb")) == NULL) {
                DEBUG((DBG_FILES, "reopen(%s) -> Error\n", font->filename));
                return -1;
        }
@@ -468,7 +469,7 @@ void        font_finish_definitions(DviContext *dvi)
        font_free_unused(&dvi->device);
 
        if(dvi->fonts == NULL) {
-               warning(_("%s: no fonts defined\n"), dvi->filename);
+               mdvi_warning(_("%s: no fonts defined\n"), dvi->filename);
                return;
        }
        map = xnalloc(DviFontRef *, dvi->nfonts);