File: pcl-common.h

package info (click to toggle)
cups-filters 1.28.17-3%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 6,096 kB
  • sloc: ansic: 54,489; cpp: 7,023; sh: 1,911; makefile: 963; xml: 127; perl: 73; php: 28; python: 8
file content (66 lines) | stat: -rw-r--r-- 1,885 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 *   Common HP-PCL definitions for CUPS.
 *
 *   Copyright 2007-2011 by Apple Inc.
 *   Copyright 1993-2005 by Easy Software Products, All Rights Reserved.
 *
 *   These coded instructions, statements, and computer programs are the
 *   property of Apple Inc. and are protected by Federal copyright
 *   law.  Distribution and use rights are outlined in the file "COPYING"
 *   which should have been included with this file.
 */

/*
 * Include necessary headers...
 */

#include <string.h>
#include <ctype.h>
#include "pcl.h"


/*
 * Functions/macros...
 */

#define pcl_reset()\
	printf("\033E")
#define pcl_set_copies(copies)\
	printf("\033&l%dX", (copies))
#define pcl_set_pcl_mode(m)\
	printf("\033%%%dA", (m))
#define pcl_set_hpgl_mode(m)\
	printf("\033%%%dB", (m))
#define pcl_set_negative_motion()\
        printf("\033&a1N")
#define pcl_set_media_source(source)\
	printf("\033&l%dH", source)
#define pcl_set_media_type(type)\
	printf("\033&l%dM", type)
#define pcl_set_duplex(duplex,landscape)\
	if (duplex) printf("\033&l%dS", (duplex) + (landscape))
#define pcl_set_simple_black()\
	printf("\033*r-1U")
#define pcl_set_simple_color()\
	printf("\033*r3U")
#define pcl_set_simple_cmy()\
	printf("\033*r-3U")
#define pcl_set_simple_kcmy()\
	printf("\033*r-4U")
#define pcl_set_simple_resolution(r)\
	printf("\033*t%dR", (r))

#define pjl_escape()\
	printf("\033%%-12345X@PJL\r\n")
#define pjl_set_job(job_id,user,title)\
	printf("@PJL JOB NAME = \"%s\" DISPLAY = \"%d %s %s\"\r\n", \
	       (title), (job_id), (user), (title))
#define pjl_enter_language(lang)\
	printf("@PJL ENTER LANGUAGE=%s\r\n", (lang))

extern void	pcl_set_media_size(ppd_file_t *ppd, float width, float length);
extern void	pjl_write(const char *format,
		          const char *value, int job_id,
                	  const char *user, const char *title,
			  int num_options, cups_option_t *options);