/* Copyright (C) 2000 artofcode LLC. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA, 02111-1307. */ /*$Id: zcid.c,v 1.3.6.1.2.1 2003/01/17 00:49:05 giles Exp $ */ /* CMap and CID-keyed font services */ #include "ghost.h" #include "errors.h" #include "gxcid.h" #include "icid.h" /* for checking prototype */ #include "idict.h" #include "idparam.h" #include "oper.h" /* Get the information from a CIDSystemInfo dictionary. */ int cid_system_info_param(gs_cid_system_info_t *pcidsi, const ref *prcidsi) { ref *pregistry; ref *pordering; int code; if (!r_has_type(prcidsi, t_dictionary)) return_error(e_typecheck); if (dict_find_string(prcidsi, "Registry", &pregistry) <= 0 || dict_find_string(prcidsi, "Ordering", &pordering) <= 0 ) return_error(e_rangecheck); check_read_type_only(*pregistry, t_string); check_read_type_only(*pordering, t_string); pcidsi->Registry.data = pregistry->value.const_bytes; pcidsi->Registry.size = r_size(pregistry); pcidsi->Ordering.data = pordering->value.const_bytes; pcidsi->Ordering.size = r_size(pordering); code = dict_int_param(prcidsi, "Supplement", 0, max_int, -1, &pcidsi->Supplement); return (code < 0 ? code : 0); }