--- gs5.50/gdevcd8.c.cdj880	Fri Sep 11 17:55:16 1998
+++ gs5.50/gdevcd8.c	Wed Aug  2 15:30:45 2000
@@ -357,9 +357,82 @@
 127, 131, 133, 134, 138, 140, 141, 146, 148, 151, 154, 156, 160, 163,
 166, 169, 174, 177, 182, 187, 194, 203, 215, 255}, };
 
+private Gamma gammat880 =  { 
+/* Lookup values for cyan */
+{ 0,   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,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,  79,
+ 80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,
+ 96,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255},
+
+/* Lookup values for magenta */
+{ 0,   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,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,  79,
+ 80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,
+ 96,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255},
+
+/* Lookup values for yellow */ 
+{ 0,   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,  67,  68,  69,  70,  71,  72,  73,  74,  75,  76,  77,  78,  79,
+ 80,  81,  82,  83,  84,  85,  86,  87,  88,  89,  90,  91,  92,  93,  94,  95,
+ 96,  97,  98,  99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
+112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
+128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143,
+144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159,
+160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175,
+176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191,
+192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207,
+208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223,
+224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239,
+240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255},
+
+ /* Lookup values for black */
+{0, 0, 0, 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, 3, 2, 4, 3, 3, 3, 3, 3, 4, 4,
+4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 8,
+8, 8, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13,
+12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 16, 16,
+16, 17, 17, 17, 17, 18, 18, 18, 19, 19, 20, 20, 20, 20, 20, 21, 21,
+21, 21, 22, 22, 22, 22, 23, 22, 23, 23, 24, 24, 24, 24, 25, 25, 26,
+26, 26, 26, 27, 27, 28, 28, 28, 28, 29, 29, 30, 30, 31, 31, 31, 32,
+32, 33, 33, 34, 34, 35, 36, 36, 36, 37, 37, 37, 38, 38, 40, 40, 40,
+41, 41, 42, 43, 43, 43, 43, 44, 45, 45, 46, 47, 47, 48, 49, 49, 50,
+52, 52, 53, 54, 54, 56, 56, 57, 58, 59, 60, 60, 61, 62, 63, 63, 64,
+65, 66, 67, 68, 69, 70, 71, 72, 72, 73, 75, 75, 76, 77, 78, 80, 81,
+82, 82, 83, 84, 85, 86, 88, 89, 90, 91, 94, 95, 96, 98, 99, 100, 101,
+103, 105, 106, 107, 110, 111, 112, 115, 116, 118, 120, 121, 124, 126,
+127, 131, 133, 134, 138, 140, 141, 146, 148, 151, 154, 156, 160, 163,
+166, 169, 174, 177, 182, 187, 194, 203, 215, 255}, };
+
 private Gamma *gammat[] = {
    &gammat850, /* CDJ670 */
    &gammat850, /* CDJ850 */
+   &gammat880, /* CDJ880 */
    &gammat890, /* CDJ890 */
    &gammat850  /* CDJ1600 */
 };
@@ -407,7 +480,7 @@
 enum {DRAFT=-1, NORMAL=0, PRESENTATION=1};
 
 /* Printer types */
-enum {DJ670C, DJ850C, DJ890C, DJ1600C};
+enum {DJ670C, DJ850C, DJ880C, DJ890C, DJ1600C};
 
 /* No. of ink jets (used to minimise head movements) */
 #define HEAD_ROWS_MONO 50
@@ -432,7 +505,7 @@
 /* The device descriptors */
 
 /* The basic structure for all printers. Note the presence of the cmyk, depth
-   and correct fields even if soem are not used by all printers. */
+   and correct fields even if some are not used by all printers. */
 
 #define prn_colour_device_body(dtype, procs, dname, w10, h10, xdpi, ydpi, lm, bm, rm, tm, ncomp, depth, mg, mc, dg, dc, print_page, cmyk, correct)\
     prn_device_body(dtype, procs, dname, w10, h10, xdpi, ydpi, lm, bm, rm, tm, ncomp, depth, mg, mc, dg, dc, print_page), cmyk, depth /* default */, correct
@@ -632,6 +705,10 @@
 }
 
 private void
+cdj880_start_raster_mode(P3(gx_device_printer * pdev,
+			    int papersize,  FILE * prn_stream));
+
+private void
 cdj850_start_raster_mode(P3(gx_device_printer * pdev,
 			    int papersize,  FILE * prn_stream));
 
@@ -666,6 +743,10 @@
 cmyk_colour_procs(hp_colour_open, cdj850_get_params, cdj850_put_params,
 		  NULL, gdev_cmyk_map_color_rgb, gdev_cmyk_map_cmyk_color);
 
+private gx_device_procs cdj880_procs =
+cmyk_colour_procs(hp_colour_open, cdj850_get_params, cdj850_put_params,
+		  NULL, gdev_cmyk_map_color_rgb, gdev_cmyk_map_cmyk_color);
+
 private gx_device_procs cdj890_procs =
 cmyk_colour_procs(hp_colour_open, cdj850_get_params, cdj850_put_params,
 		  NULL, gdev_cmyk_map_color_rgb, gdev_cmyk_map_cmyk_color);
@@ -688,6 +769,13 @@
 	       cdj850_start_raster_mode, cdj850_print_non_blank_lines,
 	       cdj850_terminate_page);
 
+gx_device_cdj850 far_data gs_cdj880_device =
+cdj_850_device(cdj880_procs, "cdj880", 600, 600, 32, cdj850_print_page, 0,
+	       PRESENTATION, PLAIN_PAPER, 2, DJ880C, 9,
+	       1.0, 0.0, 0.0, 0.0, 0.0, 1.0,
+	       cdj880_start_raster_mode, cdj850_print_non_blank_lines,
+	       cdj1600_terminate_page);
+
 gx_device_cdj850 far_data gs_cdj890_device =
 cdj_850_device(cdj890_procs, "cdj890", 600, 600, 32, cdj850_print_page, 0,
 	       PRESENTATION, PLAIN_PAPER, 4, DJ890C, 9,
@@ -740,6 +828,21 @@
 
    /* assign printer type and set resolution dependent on printer type */
    switch (cdj850->ptype) {
+   case DJ880C:
+     if (pdev->x_pixels_per_inch == 300 &&
+	 pdev->y_pixels_per_inch == 300) {
+       cdj850->xscal = 0;
+       cdj850->yscal = 0;
+       cdj850->intensities = 2;
+     } else if (pdev->x_pixels_per_inch == 600 &&
+		pdev->y_pixels_per_inch == 600) {
+       cdj850->xscal = 1;
+       cdj850->yscal = 1;
+     } else {
+       return_error(gs_error_rangecheck);
+     }
+     m = (gdev_pcl_paper_size(pdev) == PAPER_SIZE_A4 ? dj_a4 : dj_letter);
+     break;
    case DJ670C: 
       if (cdj850->papertype <= SPECIAL_PAPER) { /* paper */
 	 if (cdj850->quality == DRAFT) {
@@ -1992,6 +2095,18 @@
   return;   
 } /* end configure raster-mode */
      
+private void
+cdj880_start_raster_mode(gx_device_printer* pdev, int paper_size, 
+			 FILE* prn_stream)
+{
+   /* switch to PCL control language */
+   fputs("\033%-12345X@PJL enter language = PCL\n", prn_stream);
+
+   cdj850_start_raster_mode(pdev, paper_size, prn_stream);
+
+   return;   
+}
+
 /*
  * Mode 9 2D compression for the HP DeskJets . This mode can give
  * very good compression ratios, especially if there are areas of flat
--- gs5.50/unix-gcc.mak.cdj880	Wed Aug  2 15:31:46 2000
+++ gs5.50/unix-gcc.mak	Wed Aug  2 15:31:56 2000
@@ -315,7 +315,7 @@
 	lj5mono.dev lj5gray.dev declj250.dev hl7x0.dev
 DEVICE_DEVS4=cdeskjet.dev cdjcolor.dev cdjmono.dev cdj500.dev cdj550.dev \
 	paintjet.dev pj.dev pjxl.dev pjxl300.dev pjetxl.dev cdj850.dev \
-	cdj670.dev cdj890.dev cdj1600.dev
+	cdj670.dev cdj880.dev cdj890.dev cdj1600.dev
 DEVICE_DEVS5=uniprint.dev
 DEVICE_DEVS6=bj10e.dev bj200.dev bjc600.dev bjc800.dev epson.dev eps9mid.dev \
 	eps9high.dev epsonc.dev ibmpro.dev jetp3852.dev oki182.dev okiibm.dev
--- gs5.50/contrib.mak.cdj880	Wed Aug  2 15:32:01 2000
+++ gs5.50/contrib.mak	Wed Aug  2 15:32:33 2000
@@ -444,6 +444,9 @@
 cdj670.dev: $(cdeskjet8_) page.dev
 	$(SETPDEV) cdj670 $(cdeskjet8_)
 
+cdj880.dev: $(cdeskjet8_) page.dev
+	$(SETPDEV) cdj880 $(cdeskjet8_)
+
 cdj890.dev: $(cdeskjet8_) page.dev
 	$(SETPDEV) cdj890 $(cdeskjet8_)
 
