pike.git / src / modules / Image / font.c

version» Context lines:

pike.git/src/modules/Image/font.c:1: - /* $Id: font.c,v 1.57 1999/11/23 07:07:39 hubbe Exp $ */ + /* $Id: font.c,v 1.58 2000/03/25 23:34:32 hubbe Exp $ */   #include "global.h"      #define SPACE_CHAR 'i'      extern unsigned char * image_default_font;   #define IMAGE_DEFAULT_FONT_SIZE 30596      /*   **! module Image   **! note - **! $Id: font.c,v 1.57 1999/11/23 07:07:39 hubbe Exp $ + **! $Id: font.c,v 1.58 2000/03/25 23:34:32 hubbe Exp $   **! class Font   **!   **! note   **! Short technical documentation on a font file:   **! This object adds the text-drawing and -creation   **! capabilities of the <ref>Image</ref> module.   **!   **! For simple usage, see   **! <ref>write</ref> and <ref>load</ref>.   **!
pike.git/src/modules/Image/font.c:381:    size = (size_t) file_size(fd);    if (size > 0)    {    new_font=THIS=(struct font *)xalloc(sizeof(struct font));       THREADS_ALLOW();   #ifdef HAVE_MMAP    new_font->mem =    mmap(0,size,PROT_READ,MAP_SHARED,fd,0);   #ifdef MAP_FAILED -  if (new_font->mem==MAP_FAILED) +  if ((char *)new_font->mem == (char *)MAP_FAILED)   #else    if (new_font->mem==(void*)-1)   #endif    {    new_font->mem=0;    new_font->mmaped_size=0;    }    else    new_font->mmaped_size=size;   #else