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

version» Context lines:

pike.git/src/modules/Image/font.c:32:   **! {   **! unsigned INT32 width; - width of this character   **! unsigned INT32 spacing; - spacing to next character   **! unsigned char data[1]; - pixmap data (1byte/pixel)   **! } *ch;   **! </pre>   **!   **! see also: Image, Image.image   */    - /* $Id: font.c,v 1.10 1997/05/19 22:50:25 hubbe Exp $ */ + /* $Id: font.c,v 1.11 1997/05/25 09:35:36 grubba Exp $ */      #include "global.h"      #include <sys/types.h>   #include <sys/stat.h>      #ifdef HAVE_FCNTL_H   #include <fcntl.h>   #endif   
pike.git/src/modules/Image/font.c:152:    return 0;    }    }    return res;   }      static inline long file_size(int fd)   {    struct stat tmp;    int res; -  if(!fstat(fd, &tmp)) return res = tmp.st_size; +  if((!fstat(fd, &tmp)) && +  (tmp.st_mode & S_IFREG)) { +  return res = tmp.st_size; +  }    return -1;   }      static inline void write_char(struct _char *ci,    rgb_group *pos,    INT32 xsize,    INT32 height)   {    rgb_group *nl;    INT32 x,y;