Branch: Tag:

2005-11-13

2005-11-13 12:14:28 by Martin Nilsson <mani@lysator.liu.se>

Use get_all_args in font loader.

Rev: src/modules/Image/font.c:1.89

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: font.c,v 1.88 2005/11/03 16:08:51 grubba Exp $ + || $Id: font.c,v 1.89 2005/11/13 12:14:28 nilsson Exp $   */      #include "global.h"
310:    size_t mmaped_size = 0;   #endif    size_t size = 0; +  char *filename;    -  if (args && Pike_sp[-args].type != T_STRING) -  Pike_error("font->read: illegal or wrong number of arguments\n"); +  get_all_args("Image.Font->load()", args, ".%s", &filename);       if (!args)    {
326: Inside #if defined(FONT_DEBUG)
  #ifdef FONT_DEBUG    fprintf(stderr,"FONT open '%s'\n",sp[-args].u.string->str);   #endif -  fd = fd_open(sp[-args].u.string->str,fd_RDONLY,0); +  fd = fd_open(filename,fd_RDONLY,0);    if (errno == EINTR) check_threads_etc();    } while(fd < 0 && errno == EINTR);   
586:    }    }    break; + #ifdef PIKE_DEBUG    default:    Pike_fatal("Illegal shift size!\n"); -  + #endif    }    width_of[j]=max;    if (max>maxwidth2) maxwidth2=max;
692:    }    /* THREADS_DISALLOW(); */    break; + #ifdef PIKE_DEBUG    default:    Pike_fatal("Illegal shift size!\n"); -  + #endif    }    }    CALL_AND_UNSET_ONERROR(err);