gp_vms.c 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656
  1. /* Copyright (C) 1989-2003 artofcode LLC. All rights reserved.
  2. This software is provided AS-IS with no warranty, either express or
  3. implied.
  4. This software is distributed under license and may not be copied,
  5. modified or distributed except as expressly authorized under the terms
  6. of the license contained in the file LICENSE in this distribution.
  7. For more information about licensing, please refer to
  8. http://www.ghostscript.com/licensing/. For information on
  9. commercial licensing, go to http://www.artifex.com/licensing/ or
  10. contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  11. San Rafael, CA 94903, U.S.A., +1(415)492-9861.
  12. */
  13. /* $Id: gp_vms.c,v 1.38 2004/04/08 16:18:25 giles Exp $ */
  14. /* VAX/VMS specific routines for Ghostscript */
  15. #include "string_.h"
  16. #include "memory_.h"
  17. #include "gx.h"
  18. #include "gp.h"
  19. #include "gpmisc.h"
  20. #include "gsstruct.h"
  21. #include <stat.h>
  22. #include <stdlib.h> /* for exit() with some compiler versions */
  23. #include <errno.h> /* for exit() with other compiler versions */
  24. #include <unixio.h>
  25. extern char *getenv(const char *);
  26. /* Apparently gcc doesn't allow extra arguments for fopen: */
  27. #ifdef VMS /* DEC C */
  28. # define fopen_VMS fopen
  29. #else /* gcc */
  30. # define fopen_VMS(name, mode, m1, m2) fopen(name, mode)
  31. #endif
  32. /* VMS string descriptor structure */
  33. #define DSC$K_DTYPE_T 14
  34. #define DSC$K_CLASS_S 1
  35. struct dsc$descriptor_s {
  36. unsigned short dsc$w_length;
  37. unsigned char dsc$b_dtype;
  38. unsigned char dsc$b_class;
  39. char *dsc$a_pointer;
  40. };
  41. typedef struct dsc$descriptor_s descrip;
  42. /* VMS RMS constants */
  43. #define RMS_IS_ERROR_OR_NMF(rmsv) (((rmsv) & 1) == 0)
  44. #define RMS$_NMF 99018
  45. #define RMS$_NORMAL 65537
  46. #define NAM$C_MAXRSS 255
  47. struct file_enum_s {
  48. uint context, length;
  49. descrip pattern;
  50. gs_memory_t *memory;
  51. };
  52. gs_private_st_ptrs1(st_file_enum, struct file_enum_s, "file_enum",
  53. file_enum_enum_ptrs, file_enum_reloc_ptrs, pattern.dsc$a_pointer);
  54. extern uint
  55. LIB$FIND_FILE(descrip *, descrip *, uint *, descrip *, descrip *,
  56. uint *, uint *),
  57. LIB$FIND_FILE_END(uint *),
  58. SYS$FILESCAN(descrip *, uint *, uint *),
  59. SYS$PUTMSG(uint *, int (*)(), descrip *, uint);
  60. private uint
  61. strlength(char *str, uint maxlen, char term)
  62. {
  63. uint i = 0;
  64. while (i < maxlen && str[i] != term)
  65. i++;
  66. return i;
  67. }
  68. /* Do platform-dependent initialization. */
  69. void
  70. gp_init(void)
  71. {
  72. }
  73. /* Do platform-dependent cleanup. */
  74. void
  75. gp_exit(int exit_status, int code)
  76. {
  77. }
  78. /* Exit the program. */
  79. void
  80. gp_do_exit(int exit_status)
  81. { /* The program returns exit_status = 0 for OK, 1 for failure; */
  82. /* VMS has different conventions. */
  83. switch (exit_status) {
  84. case 0:
  85. exit(exit_OK);
  86. case 1:
  87. exit(exit_FAILED);
  88. }
  89. exit(exit_status);
  90. }
  91. /* ------ Date and time ------ */
  92. /* Read the current time (in seconds since Jan. 1, 1980) */
  93. /* and fraction (in nanoseconds). */
  94. void
  95. gp_get_realtime(long *pdt)
  96. {
  97. struct {
  98. uint _l0, _l1;
  99. } binary_date, now, difference;
  100. long LIB$EDIV(), LIB$SUBX(), SYS$BINTIM(), SYS$GETTIM();
  101. long units_per_second = 10000000;
  102. char *jan_1_1980 = "1-JAN-1980 00:00:00.00";
  103. descrip str_desc;
  104. /* For those interested, Wednesday, November 17, 1858 is the base
  105. of the Modified Julian Day system adopted by the Smithsonian
  106. Astrophysical Observatory in 1957 for satellite tracking. (The
  107. year 1858 preceded the oldest star catalog in use at the
  108. observatory.) VMS uses quadword time stamps which are offsets
  109. in 100 nanosecond units from November 17, 1858. With a 63-bit
  110. absolute time representation (sign bit must be clear), VMS will
  111. have no trouble with time until 31-JUL-31086 02:48:05.47. */
  112. /* Convert January 1, 1980 into a binary absolute time */
  113. str_desc.dsc$w_length = strlen(jan_1_1980);
  114. str_desc.dsc$a_pointer = jan_1_1980;
  115. (void)SYS$BINTIM(&str_desc, &binary_date);
  116. /* Compute number of 100 nanosecond units since January 1, 1980. */
  117. (void)SYS$GETTIM(&now);
  118. (void)LIB$SUBX(&now, &binary_date, &difference);
  119. /* Convert to seconds and nanoseconds. */
  120. (void)LIB$EDIV(&units_per_second, &difference, &pdt[0], &pdt[1]);
  121. pdt[1] *= 100;
  122. }
  123. /* Read the current user CPU time (in seconds) */
  124. /* and fraction (in nanoseconds). */
  125. void
  126. gp_get_usertime(long *pdt)
  127. {
  128. gp_get_realtime(pdt); /* Use an approximation for now. */
  129. }
  130. /* ------ Persistent data cache ------*/
  131. /* insert a buffer under a (type, key) pair */
  132. int gp_cache_insert(int type, byte *key, int keylen, void *buffer, int buflen)
  133. {
  134. /* not yet implemented */
  135. return 0;
  136. }
  137. /* look up a (type, key) in the cache */
  138. int gp_cache_query(int type, byte* key, int keylen, void **buffer,
  139. gp_cache_alloc alloc, void *userdata)
  140. {
  141. /* not yet implemented */
  142. return -1;
  143. }
  144. /* ------ Screen management ------ */
  145. /* Get the environment variable that specifies the display to use. */
  146. const char *
  147. gp_getenv_display(void)
  148. {
  149. return getenv("DECW$DISPLAY");
  150. }
  151. /* ------ Printer accessing ------ */
  152. /* Open a connection to a printer. A null file name means use the */
  153. /* standard printer connected to the machine, if any. */
  154. /* Return NULL if the connection could not be opened. */
  155. FILE *
  156. gp_open_printer(char fname[gp_file_name_sizeof], int binary_mode)
  157. {
  158. if (strlen(fname) == 0)
  159. return 0;
  160. if (binary_mode) { /*
  161. * Printing must be done exactly byte to byte,
  162. * using "passall". However the standard VMS symbiont
  163. * does not treat stream-LF files correctly in this respect,
  164. * but throws away \n characters. Giving the file
  165. * the record type "undefined", but accessing it as a
  166. * normal stream-LF file does the trick.
  167. */
  168. return fopen_VMS(fname, "w", "rfm = udf", "ctx = stm");
  169. } else { /* Open as a normal text stream file. */
  170. return fopen_VMS(fname, "w", "rfm = var", "rat = cr");
  171. }
  172. }
  173. /* Close the connection to the printer. */
  174. void
  175. gp_close_printer(FILE * pfile, const char *fname)
  176. {
  177. fclose(pfile);
  178. }
  179. /* ------ File naming and accessing ------ */
  180. /* Define the character used for separating file names in a list. */
  181. const char gp_file_name_list_separator = ',';
  182. /* Define the default scratch file name prefix. */
  183. const char gp_scratch_file_name_prefix[] = "_temp_";
  184. /* Define the name of the null output file. */
  185. const char gp_null_file_name[] = "NLA0:";
  186. /* Define the name that designates the current directory. */
  187. const char gp_current_directory_name[] = "[]";
  188. /* Define the string to be concatenated with the file mode */
  189. /* for opening files without end-of-line conversion. */
  190. const char gp_fmode_binary_suffix[] = "";
  191. /* Define the file modes for binary reading or writing. */
  192. const char gp_fmode_rb[] = "r";
  193. const char gp_fmode_wb[] = "w";
  194. /* Create and open a scratch file with a given name prefix. */
  195. /* Write the actual file name at fname. */
  196. FILE *
  197. gp_open_scratch_file(const char *prefix, char fname[gp_file_name_sizeof],
  198. const char *mode)
  199. {
  200. FILE *f;
  201. char tmpdir[gp_file_name_sizeof];
  202. int tdlen = gp_file_name_sizeof;
  203. int flen[1];
  204. if (!gp_file_name_is_absolute(prefix, strlen(prefix)) &&
  205. gp_gettmpdir(tmpdir, &tdlen) == 0) {
  206. flen[0] = gp_file_name_sizeof;
  207. if (gp_file_name_combine(tmpdir, tdlen, prefix, strlen(prefix),
  208. false, fname, flen ) != gp_combine_success ) {
  209. return NULL;
  210. }
  211. fname[ *flen ] = 0;
  212. } else {
  213. strcpy(fname, prefix);
  214. }
  215. if (strlen(fname) + 6 >= gp_file_name_sizeof)
  216. return 0; /* file name too long */
  217. strcat(fname, "XXXXXX");
  218. mktemp(fname);
  219. f = fopen(fname, mode);
  220. if (f == NULL)
  221. eprintf1("**** Could not open temporary file %s\n", fname);
  222. return f;
  223. }
  224. /* Open a file with the given name, as a stream of uninterpreted bytes. */
  225. /* We have to do something special if the file was FTP'ed in binary mode. */
  226. /* Unfortunately, only DEC C supports the extra arguments to fopen. */
  227. FILE *
  228. gp_fopen(const char *fname, const char *mode)
  229. {
  230. #ifdef __DECC
  231. #define FAB$C_FIX 1
  232. stat_t buffer;
  233. if (stat((char *)fname, &buffer) == 0)
  234. if (buffer.st_fab_rfm == FAB$C_FIX)
  235. return fopen(fname, mode, "rfm=stmlf", "ctx=stm");
  236. #endif
  237. return fopen(fname, mode);
  238. }
  239. /* Set a file into binary or text mode. */
  240. int
  241. gp_setmode_binary(FILE * pfile, bool binary)
  242. {
  243. return 0; /* Noop under VMS */
  244. }
  245. /* ------ Wild card file search procedures ------ */
  246. private void
  247. gp_free_enumeration(file_enum * pfen)
  248. {
  249. if (pfen) {
  250. LIB$FIND_FILE_END(&pfen->context);
  251. gs_free_object(pfen->memory, pfen->pattern.dsc$a_pointer,
  252. "GP_ENUM(pattern)");
  253. gs_free_object(pfen->memory, pfen,
  254. "GP_ENUM(file_enum)");
  255. }
  256. }
  257. /* Begin an enumeration. See gp.h for details. */
  258. file_enum *
  259. gp_enumerate_files_init(const char *pat, uint patlen, gs_memory_t * mem)
  260. {
  261. file_enum *pfen;
  262. uint i, len;
  263. char *c, *newpat;
  264. bool dot_in_filename = false;
  265. pfen = gs_alloc_struct(mem, file_enum, &st_file_enum,
  266. "GP_ENUM(file_enum)");
  267. newpat = (char *)gs_alloc_bytes(mem, patlen + 2, "GP_ENUM(pattern)");
  268. if (pfen == 0 || newpat == 0) {
  269. gs_free_object(mem, newpat, "GP_ENUM(pattern)");
  270. gs_free_object(mem, pfen, "GP_ENUM(file_enum)");
  271. return (file_enum *) 0;
  272. }
  273. /* Copy the pattern removing backslash quoting characters and
  274. * transforming unquoted question marks, '?', to percent signs, '%'.
  275. * (VAX/VMS uses the wildcard '%' to represent exactly one character
  276. * and '*' to represent zero or more characters. Any combination and
  277. * number of interspersed wildcards is permitted.)
  278. *
  279. * Since VMS requires "*.*" to actually return all files, we add a
  280. * special check for a path ending in "*" and change it into "*.*"
  281. * if a "." wasn't part of the file spec. Thus "[P.A.T.H]*" becomes
  282. * "[P.A.T.H]*.*" but "[P.A.T.H]*.*" or "[P.A.T.H]*.X*" are unmodified.
  283. */
  284. c = newpat;
  285. for (i = 0; i < patlen; pat++, i++)
  286. switch (*pat) {
  287. case '?':
  288. *c++ = '%';
  289. break;
  290. case '\\':
  291. i++;
  292. if (i < patlen)
  293. *c++ = *++pat;
  294. break;
  295. case '.':
  296. case ']':
  297. dot_in_filename = *pat == '.';
  298. default:
  299. *c++ = *pat;
  300. break;
  301. }
  302. /* Check for trailing "*" and see if we need to add ".*" */
  303. if (pat[-1] == '*' && !dot_in_filename) {
  304. *c++ = '.';
  305. *c++ = '*';
  306. }
  307. len = c - newpat;
  308. /* Pattern may not exceed 255 characters */
  309. if (len > 255) {
  310. gs_free_object(mem, newpat, "GP_ENUM(pattern)");
  311. gs_free_object(mem, pfen, "GP_ENUM(file_enum)");
  312. return (file_enum *) 0;
  313. }
  314. pfen->context = 0;
  315. pfen->length = patlen;
  316. pfen->pattern.dsc$w_length = len;
  317. pfen->pattern.dsc$b_dtype = DSC$K_DTYPE_T;
  318. pfen->pattern.dsc$b_class = DSC$K_CLASS_S;
  319. pfen->pattern.dsc$a_pointer = newpat;
  320. pfen->memory = mem;
  321. return pfen;
  322. }
  323. /* Return the next file name in the enumeration. The client passes in */
  324. /* a scratch string and a max length. If the name of the next file fits, */
  325. /* the procedure returns the length. If it doesn't fit, the procedure */
  326. /* returns max length +1. If there are no more files, the procedure */
  327. /* returns -1. */
  328. uint
  329. gp_enumerate_files_next(file_enum * pfen, char *ptr, uint maxlen)
  330. {
  331. char *c, filnam[NAM$C_MAXRSS];
  332. descrip result =
  333. {NAM$C_MAXRSS, DSC$K_DTYPE_T, DSC$K_CLASS_S, 0};
  334. uint i, len;
  335. result.dsc$a_pointer = filnam;
  336. /* Find the next file which matches the pattern */
  337. i = LIB$FIND_FILE(&pfen->pattern, &result, &pfen->context,
  338. (descrip *) 0, (descrip *) 0, (uint *) 0, (uint *) 0);
  339. /* Check the return status */
  340. if (RMS_IS_ERROR_OR_NMF(i)) {
  341. gp_free_enumeration(pfen);
  342. return (uint)(-1);
  343. } else if ((len = strlength(filnam, NAM$C_MAXRSS, ' ')) > maxlen)
  344. return maxlen + 1;
  345. /* Copy the returned filename over to the input string ptr */
  346. c = ptr;
  347. for (i = 0; i < len; i++)
  348. *c++ = filnam[i];
  349. return len;
  350. }
  351. /* Clean up a file enumeration. This is only called to abandon */
  352. /* an enumeration partway through: ...next should do it if there are */
  353. /* no more files to enumerate. This should deallocate the file_enum */
  354. /* structure and any subsidiary structures, strings, buffers, etc. */
  355. void
  356. gp_enumerate_files_close(file_enum * pfen)
  357. {
  358. gp_free_enumeration(pfen);
  359. }
  360. const char *
  361. gp_strerror(int errnum)
  362. {
  363. return NULL;
  364. }
  365. /* -------------- Helpers for gp_file_name_combine_generic ------------- */
  366. uint gp_file_name_root(const char *fname, uint len)
  367. {
  368. /*
  369. * The root for device:[root.][directory.subdirectory]filename.extension;version
  370. * is device:[root.][
  371. * The root for device:[directory.subdirectory]filename.extension;version
  372. * is device:[
  373. * The root for logical:filename.extension;version
  374. * is logical:
  375. */
  376. int i, j;
  377. if (len == 0)
  378. return 0;
  379. /* Search for ':' */
  380. for (i = 0; i < len; i++)
  381. if (fname[i] == ':')
  382. break;
  383. if (i == len)
  384. return 0; /* No root. */
  385. if (fname[i] == ':')
  386. i++;
  387. if (i == len || fname[i] != '[')
  388. return i;
  389. /* Search for ']' */
  390. i++;
  391. for (j = i; j < len; j++)
  392. if (fname[j] == ']')
  393. break;
  394. if (j == len)
  395. return i; /* No ']'. Allowed as a Ghostscript specifics. */
  396. j++;
  397. if (j == len)
  398. return i; /* Appending "device:[directory.subdirectory]" with "filename.extension;version". */
  399. if (fname[j] != '[')
  400. return i; /* Can't append anything, but pass through for checking an absolute path. */
  401. return j + 1; /* device:[root.][ */
  402. }
  403. uint gs_file_name_check_separator(const char *fname, int len, const char *item)
  404. {
  405. if (len > 0) {
  406. /*
  407. * Ghostscript specifics : an extended syntax like Mac OS.
  408. * We intentionally don't consider ':' and '[' as separators
  409. * in forward search, see gp_file_name_combine.
  410. */
  411. if (fname[0] == ']')
  412. return 1; /* It is a file separator. */
  413. if (fname[0] == '.')
  414. return 1; /* It is a directory separator. */
  415. if (fname[0] == '-') {
  416. if (fname == item + 1 && item[0] == '-')
  417. return 1; /* Two or more parents, cut the first one. */
  418. return 1;
  419. }
  420. } else if (len < 0) {
  421. if (fname[-1] == '.' || fname[-1] == ':' || fname[-1] == '[')
  422. return 1;
  423. }
  424. return 0;
  425. }
  426. bool gp_file_name_is_parent(const char *fname, uint len)
  427. { /* Ghostscript specifics : an extended syntax like Mac OS. */
  428. return len == 1 && fname[0] == '-';
  429. }
  430. bool gp_file_name_is_current(const char *fname, uint len)
  431. { /* Ghostscript specifics : an extended syntax like Mac OS. */
  432. return len == 0;
  433. }
  434. const char *gp_file_name_separator(void)
  435. { return "]";
  436. }
  437. const char *gp_file_name_directory_separator(void)
  438. { return ".";
  439. }
  440. const char *gp_file_name_parent(void)
  441. { return "-";
  442. }
  443. const char *gp_file_name_current(void)
  444. { return "";
  445. }
  446. bool gp_file_name_is_partent_allowed(void)
  447. { return false;
  448. }
  449. bool gp_file_name_is_empty_item_meanful(void)
  450. { return true;
  451. }
  452. gp_file_name_combine_result
  453. gp_file_name_combine(const char *prefix, uint plen, const char *fname, uint flen,
  454. bool no_sibling, char *buffer, uint *blen)
  455. {
  456. /*
  457. * Reduce it to the general case.
  458. *
  459. * Implementation restriction : fname must not contain a part of
  460. * "device:[root.]["
  461. */
  462. uint rlen, flen1 = flen, plen1 = plen;
  463. const char *fname1 = fname;
  464. if ( plen > 0 && prefix[plen-1] == '\0' )
  465. plen--;
  466. if (plen == 0 && flen == 0) {
  467. /* Not sure that we need this case. */
  468. if (*blen == 0)
  469. return gp_combine_small_buffer;
  470. buffer[0] = '.';
  471. *blen = 1;
  472. }
  473. rlen = gp_file_name_root(fname, flen);
  474. if (rlen > 0 || plen == 0 || flen == 0) {
  475. if (rlen == 0 && plen != 0) {
  476. fname1 = prefix;
  477. flen1 = plen;
  478. }
  479. if (flen1 + 1 > *blen)
  480. return gp_combine_small_buffer;
  481. memcpy(buffer, fname1, flen1);
  482. buffer[flen1] = 0;
  483. *blen = flen1;
  484. return gp_combine_success;
  485. }
  486. if ( prefix[plen - 1] == ']' && fname[ 0 ] == '-' )
  487. {
  488. memcpy(buffer, prefix, plen - 1 );
  489. fname1 = fname + 1;
  490. flen1 = flen - 1;
  491. memcpy(buffer + plen - 1 , fname1, flen1);
  492. memcpy(buffer + plen + flen1 - 1 , "]" , 1 );
  493. buffer[plen + flen1] = 0;
  494. *blen = plen + flen1;
  495. return gp_combine_success;
  496. }
  497. if ( prefix[plen - 1] == ':' || (prefix[plen - 1] == ']' &&
  498. memchr(fname, ']', flen) == 0) )
  499. {
  500. /* Just concatenate. */
  501. if (plen + flen + 1 > *blen)
  502. return gp_combine_small_buffer;
  503. memcpy(buffer, prefix, plen);
  504. memcpy(buffer + plen, fname, flen);
  505. buffer[plen + flen] = 0;
  506. *blen = plen + flen;
  507. return gp_combine_success;
  508. }
  509. if ( memchr( prefix , '[' , plen ) == 0 &&
  510. memchr( prefix , '.' , plen ) == 0 )
  511. {
  512. char* tmp_prefix;
  513. int tmp_plen;
  514. if ( prefix[0] == '/' )
  515. {
  516. tmp_prefix = prefix + 1;
  517. tmp_plen = plen - 1;
  518. }
  519. else
  520. {
  521. tmp_prefix = prefix;
  522. tmp_plen = plen;
  523. }
  524. if ( tmp_plen + flen + 2 > *blen)
  525. return gp_combine_small_buffer;
  526. memcpy(buffer, tmp_prefix, tmp_plen);
  527. memcpy(buffer + tmp_plen , ":" , 1 );
  528. memcpy(buffer + tmp_plen + 1, fname, flen);
  529. if ( memchr( fname , '.' , flen ) != 0 )
  530. {
  531. buffer[ tmp_plen + flen + 1] = 0;
  532. *blen = tmp_plen + flen + 1;
  533. }
  534. else
  535. {
  536. memcpy(buffer + tmp_plen + flen + 1 , "." , 1 );
  537. buffer[ tmp_plen + flen + 2] = 0;
  538. *blen = tmp_plen + flen + 2;
  539. }
  540. return gp_combine_success;
  541. }
  542. if (prefix[plen - 1] != ']' && fname[0] == '[')
  543. return gp_combine_cant_handle;
  544. /* Unclose "][" :*/
  545. if (fname[0] == '[') {
  546. fname1 = fname + 1;
  547. flen1 = flen - 1;
  548. }
  549. if (prefix[plen - 1] == ']')
  550. plen1 = plen - 1;
  551. return gp_file_name_combine_generic(prefix, plen1,
  552. fname1, flen1, no_sibling, buffer, blen);
  553. }
  554. /* ------ Font enumeration ------ */
  555. /* This is used to query the native os for a list of font names and
  556. * corresponding paths. The general idea is to save the hassle of
  557. * building a custom fontmap file.
  558. */
  559. void *gp_enumerate_fonts_init(gs_memory_t *mem)
  560. {
  561. return NULL;
  562. }
  563. int gp_enumerate_fonts_next(void *enum_state, char **fontname, char **path)
  564. {
  565. return 0;
  566. }
  567. void gp_enumerate_fonts_free(void *enum_state)
  568. {
  569. }