Subversion Repositories wimsdev

Rev

Rev 7614 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. /*    Copyright (C) 2002-2003 XIAO, Gang of Universite de Nice - Sophia Antipolis
  2.  *
  3.  *  This program is free software; you can redistribute it and/or modify
  4.  *  it under the terms of the GNU General Public License as published by
  5.  *  the Free Software Foundation; either version 2 of the License, or
  6.  *  (at your option) any later version.
  7.  *
  8.  *  This program is distributed in the hope that it will be useful,
  9.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11.  *  GNU General Public License for more details.
  12.  *
  13.  *  You should have received a copy of the GNU General Public License
  14.  *  along with this program; if not, write to the Free Software
  15.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16.  */
  17.  
  18. /* dvi 2 gif driver, header file */
  19.  
  20. #include "config.h"
  21. #include <stdio.h>
  22. #include <stdlib.h>
  23. #include <stdarg.h>
  24. #include <string.h>
  25. #include <math.h>
  26. #include <unistd.h>
  27. #include <sys/types.h>
  28. #include <sys/stat.h>
  29. #include <sys/wait.h>
  30. #include <ctype.h>
  31. #include "gd.h"
  32.  
  33. #define MAX_LINELEN             16383
  34. #define FILE_LENGTH_LIMIT       (1*1024*1024)
  35. #define DVI_STACK_LIMIT         1024
  36. #define FONT_NUMBER_LIMIT       1024
  37. #define CHAR_NUMBER_LIMIT       256
  38. #define IMAGE_SIZE_LIMIT        (4*1024*1024)
  39. #define MAX_FONT_X              1024
  40. #define MAX_FONT_Y              1024
  41. #define MAX_PAGES               4096
  42.  
  43. typedef struct {
  44.     short int xstart, xmax, ystart, ymax;
  45.     long int w, start;
  46. } FONTHEADER;
  47.  
  48. typedef struct {
  49.     int checksum,designsize,bc,ec,cnt,num;
  50.     FONTHEADER *fh;
  51.     char *data;
  52.     char *cache;
  53. } FONT;
  54.  
  55.