~ubuntu-branches/ubuntu/hardy/ghostscript/hardy

« back to all changes in this revision

Viewing changes to src/zgeneric.c

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2007-11-22 12:17:43 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20071122121743-cd70s3ypq0r243mp
Tags: 8.61.dfsg.1-0ubtuntu1
* New upstream release
  o Final 8.61 release
* debian/patches/09_ijs_krgb_support.dpatch: Adapted to upstream changes.
* debian/rules: Updated CUPS-related variables for "make install" calls.
* debian/rules: Remove /usr/include/ghostscript from the ghostscript
  package, they go into lings-dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
12
12
*/
13
13
 
14
 
/* $Id: zgeneric.c 8022 2007-06-05 22:23:38Z giles $ */
 
14
/* $Id: zgeneric.c 8250 2007-09-25 13:31:24Z giles $ */
15
15
/* Array/string/dictionary generic operators for PostScript */
16
16
#include "memory_.h"
17
17
#include "ghost.h"
34
34
/* more efficient implementation of forall. */
35
35
 
36
36
/* Forward references */
37
 
private int zcopy_integer(i_ctx_t *);
38
 
private int zcopy_interval(i_ctx_t *);
39
 
private int copy_interval(i_ctx_t *, os_ptr, uint, os_ptr, client_name_t);
 
37
static int zcopy_integer(i_ctx_t *);
 
38
static int zcopy_interval(i_ctx_t *);
 
39
static int copy_interval(i_ctx_t *, os_ptr, uint, os_ptr, client_name_t);
40
40
 
41
41
/* <various1> <various2> copy <various> */
42
42
/* <obj1> ... <objn> <int> copy <obj1> ... <objn> <obj1> ... <objn> */
63
63
}
64
64
 
65
65
/* <obj1> ... <objn> <int> copy <obj1> ... <objn> <obj1> ... <objn> */
66
 
private int
 
66
static int
67
67
zcopy_integer(i_ctx_t *i_ctx_p)
68
68
{
69
69
    os_ptr op = osp;
98
98
 
99
99
/* <array1> <array2> copy <subarray2> */
100
100
/* <string1> <string2> copy <substring2> */
101
 
private int
 
101
static int
102
102
zcopy_interval(i_ctx_t *i_ctx_p)
103
103
{
104
104
    os_ptr op = osp;
114
114
}
115
115
 
116
116
/* <array|dict|name|packedarray|string> length <int> */
117
 
private int
 
117
static int
118
118
zlength(i_ctx_t *i_ctx_p)
119
119
{
120
120
    os_ptr op = osp;
150
150
 
151
151
/* <array|packedarray|string> <index> get <obj> */
152
152
/* <dict> <key> get <obj> */
153
 
private int
 
153
static int
154
154
zget(i_ctx_t *i_ctx_p)
155
155
{
156
156
    int code;
191
191
/* <array> <index> <obj> put - */
192
192
/* <dict> <key> <value> put - */
193
193
/* <string> <index> <int> put - */
194
 
private int
 
194
static int
195
195
zput(i_ctx_t *i_ctx_p)
196
196
{
197
197
    os_ptr op = osp;
255
255
 * and a few similar applications.  After initialization, this operator
256
256
 * should no longer be accessible by name.
257
257
 */
258
 
private int
 
258
static int
259
259
zforceput(i_ctx_t *i_ctx_p)
260
260
{
261
261
    os_ptr op = osp;
298
298
}
299
299
 
300
300
/* <seq:array|packedarray|string> <index> <count> getinterval <subseq> */
301
 
private int
 
301
static int
302
302
zgetinterval(i_ctx_t *i_ctx_p)
303
303
{
304
304
    os_ptr op = osp;
347
347
/* <array1> <index> <array2|packedarray2> putinterval - */
348
348
/* <string1> <index> <string2> putinterval - */
349
349
/* <bytestring1> <index> <string2> putinterval - */
350
 
private int
 
350
static int
351
351
zputinterval(i_ctx_t *i_ctx_p)
352
352
{
353
353
    os_ptr op = osp;
398
398
 
399
399
/* <array|packedarray|string> <<element> proc> forall - */
400
400
/* <dict> <<key> <value> proc> forall - */
401
 
private int
 
401
static int
402
402
    array_continue(i_ctx_t *),
403
403
    dict_continue(i_ctx_t *),
404
404
    string_continue(i_ctx_t *),
405
405
    packedarray_continue(i_ctx_t *);
406
 
private int forall_cleanup(i_ctx_t *);
407
 
private int
 
406
static int forall_cleanup(i_ctx_t *);
 
407
static int
408
408
zforall(i_ctx_t *i_ctx_p)
409
409
{
410
410
    os_ptr op = osp;
453
453
    return (*real_opproc(cproc))(i_ctx_p);
454
454
}
455
455
/* Continuation operator for arrays */
456
 
private int
 
456
static int
457
457
array_continue(i_ctx_t *i_ctx_p)
458
458
{
459
459
    os_ptr op = osp;
473
473
    }
474
474
}
475
475
/* Continuation operator for dictionaries */
476
 
private int
 
476
static int
477
477
dict_continue(i_ctx_t *i_ctx_p)
478
478
{
479
479
    os_ptr op = osp;
493
493
    }
494
494
}
495
495
/* Continuation operator for strings */
496
 
private int
 
496
static int
497
497
string_continue(i_ctx_t *i_ctx_p)
498
498
{
499
499
    os_ptr op = osp;
513
513
    }
514
514
}
515
515
/* Continuation operator for packed arrays */
516
 
private int
 
516
static int
517
517
packedarray_continue(i_ctx_t *i_ctx_p)
518
518
{
519
519
    os_ptr op = osp;
535
535
    }
536
536
}
537
537
/* Vacuous cleanup procedure */
538
 
private int
 
538
static int
539
539
forall_cleanup(i_ctx_t *i_ctx_p)
540
540
{
541
541
    return 0;
568
568
/* The destination is known to be an array or string, */
569
569
/* and the starting index is known to be less than or equal to */
570
570
/* its length; nothing else has been checked. */
571
 
private int
 
571
static int
572
572
copy_interval(i_ctx_t *i_ctx_p /* for ref_assign_old */, os_ptr prto,
573
573
              uint index, os_ptr prfrom, client_name_t cname)
574
574
{