home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April (Special) / Chip-Special_1997-04_cd.bin / canon / bj364 / bj364d1.exe / BJL.BIN / SOURCE.ZIP / LETTER.H < prev    next >
C/C++ Source or Header  |  1996-06-12  |  53KB  |  730 lines

  1. // ========================================================================================
  2. //    BJ Printer Setup Utility Program
  3. //    DOS Base
  4. //    BJ Printer (such as the BJC-4100 and BJC-210)
  5. //
  6. //    1. Version 1.00 [August 18, '95]       : Tsukasa Jackie AIBA    : created new
  7. //    2. Version 1.01 [September 21, '95]    : Tsukasa Jackie AIBA    : added A240
  8. //    3. Version 1.02 [September 26, '95]    : Tsukasa Jackie AIBA    : added mono display
  9. //    4. Version 1.03 [March 12, '96]        : Tsukasa Jackie AIBA    : added MultiPASS C2500
  10. //    5. Version 1.10 [April 30, '96]        : Tsukasa Jackie AIBA    : Added BJC-80/240/4200/4550
  11. //    6. Version 1.11 [May 15, 1996]         : Srinivas Krishnamurti  : Added new structure to take out TestPrint option for B380IFs
  12. //    7. Version 1.11 [June 5, 1996]         : Srinivas Krishnamurti  : Added back Test Pattern Print for B380IF without Demo Print Option
  13. //
  14. //    Copyright Canon Information Systems, Inc. 1995, 1996
  15. // ========================================================================================
  16.  
  17. #include    "bjsetup.h"
  18.  
  19. // ***********************************************************************
  20. //        define global character strings
  21. // ***********************************************************************
  22.  
  23. #define    ERROR            " Error "
  24. #define    ERROR_MOUSE      "\n Mouse driver is NOT found!"
  25. #define    ERROR_FILE       "\n Access denied because the directory is FULL or\n the file exists and can NOT be overwritten!"
  26. #define    ERROR_FILE2      "\n This file is NOT for BJ Setup Utility!"
  27. #define    ERROR_FILE3      "\n No such file, directory or invalid drive!"
  28. #define    ERROR_FILE4      "\n Permission denied!"
  29. #define    ERROR_FILE5      "\n Invalid argument!"
  30. #define    ERROR_FILE6      "\n Too many open files!"
  31. #define    ERROR_HELP       "\n Unable to open help file!"
  32. #define    ERROR_INIT       "\n A suitable file is NOT found!\n\n Please change the current directory or add a BJSETUP directory to the PATH.\n\n"
  33. #define    ERROR_REDUCTION  "\n When 'Enable' is selected in 'Smoothing',\n 'Reduction' is cancelled.\n\n             Please set again."
  34. static char *INITFAIL_MSG = "BJ Printer Setup Utility:  Unable to initialize display.";
  35.  
  36. // ***********************************************************************
  37. // @Initialize (Preset Status)
  38. // ***********************************************************************
  39.  
  40. static unsigned char    choice_US_LQ[WIN4_MENU][WIN4_MENU_W] = 
  41.                         {
  42.                                                     {" LQ emulation (LQ) "  },    //  0
  43.                                                     {" Letter "             },    //  1
  44.                                                     {" High Quality "       },    //  2
  45.                                                     {" Disable "            },    //  3
  46.                                                     {" Disable "            },    //  4
  47.                                                     {" Courier "            },    //  5
  48.                                                     {" 437 "                },    //  6
  49.                                                     {" 11 inches "          },    //  7
  50.                                                     {" Set 1 "              },    //  8
  51.                                                     {" Disable "            },    //  9
  52.                                                     {" Disable "            },    // 10
  53.                                                     {" CR = CR "            },    // 11
  54.                                                     {" LF = LF "            },    // 12
  55.                                                     {" Disable "            },    // 13
  56.                                                     {" U.S.A. "             },    // 14
  57.                                                     {" LPT1 "               },    // 15
  58.                                                     {" Roman "              },    // 16
  59.                                                     {" 437 "                },    // 17
  60.                                                     {" 22 inches "          },    // 18
  61.                                                     {" Graphics "           },    // 19
  62.                                                     {" Disable "            },    // 20
  63.                                                     {" CR = CR "            },    // 21
  64.                                                     {" BJC-240 "            },    // 22
  65.                                                     {" LQ emulation (LQ) "  },    // 23 - 0
  66.                                                     {" Letter "             },    // 24 - 1
  67.                                                     {" High Quality "       },    // 25 - 2
  68.                                                     {" Disable "            },    // 26 - 3
  69.                                                     {" Disable "            },    // 27 - 4
  70.                                                     {" Courier "            },    // 28 - 5
  71.                                                     {" 437 "                },    // 29 - 6
  72.                                                     {" 11 inches "          },    // 30 - 7
  73.                                                     {" Set 1 "              },    // 31 - 8
  74.                                                     {" Disable "            },    // 32 - 9
  75.                                                     {" Disable "            },    // 33 - 10
  76.                                                     {" CR = CR "            },    // 34 - 11
  77.                                                     {" LF = LF "            },    // 35 - 12
  78.                                                     {" Disable "            },    // 36 - 13
  79.                                                     {" U.S.A. "             },    // 37 - 14
  80.                                                     {" LPT1 "               },    // 38 - 15
  81.                                                     {" Roman "              },    // 39 - 16
  82.                                                     {" 437 "                },    // 40 - 17
  83.                                                     {" 22 inches "          },    // 41 - 18
  84.                                                     {" Graphics "           },    // 42 - 19
  85.                                                     {" Disable "            },    // 43 - 20
  86.                                                     {" CR = CR "            },    // 44 - 21
  87.                                                     {" Disable "            },    // 45 Reduction
  88.                                                     {" Disable "            },    // 46 New - AutoPowerOn
  89.                                                     {" 3.0 mm "             },    // 47 New - BJ Top Margin
  90.                                                     {" 8.5 mm "             },    // 48 New - LQ Top Margin
  91.                                                     {" Disable "            },    // 49 New - BJ Font Lock
  92.                                                     {" Disable "            }     // 50 New - LQ Font Lock
  93.                         };
  94.  
  95. static unsigned char    choice_US_BJ[WIN4_MENU][WIN4_MENU_W] = 
  96.                         {
  97.                                                     {" Bubble Jet (BJ) "    },
  98.                                                     {" Letter "             },
  99.                                                     {" High Quality "       },
  100.                                                     {" Disable "            },
  101.                                                     {" Disable "            },
  102.                                                     {" Courier "            },
  103.                                                     {" 437 "                },
  104.                                                     {" 11 inches "          },
  105.                                                     {" Set 1 "              },
  106.                                                     {" Disable "            },
  107.                                                     {" Disable "            },
  108.                                                     {" CR = CR "            },
  109.                                                     {" LF = LF "            },
  110.                                                     {" Disable "            },
  111.                                                     {" U.S.A. "             },
  112.                                                     {" LPT1 "               },
  113.                                                     {" Roman "              },
  114.                                                     {" 437 "                },
  115.                                                     {" 22 inches "          },
  116.                                                     {" Graphics "           },
  117.                                                     {" Disable "            },
  118.                                                     {" CR = CR "            },
  119.                                                     {" BJC-240 "            },
  120.                                                     {" Bubble Jet (BJ) "    },
  121.                                                     {" Letter "             },
  122.                                                     {" High Quality "       },
  123.                                                     {" Disable "            },
  124.                                                     {" Disable "            },
  125.                                                     {" Courier "            },
  126.                                                     {" 437 "                },
  127.                                                     {" 11 inches "          },
  128.                                                     {" Set 1 "              },
  129.                                                     {" Disable "            },
  130.                                                     {" Disable "            },
  131.                                                     {" CR = CR "            },
  132.                                                     {" LF = LF "            },
  133.                                                     {" Disable "            },
  134.                                                     {" U.S.A. "             },
  135.                                                     {" LPT1 "               },
  136.                                                     {" Roman "              },
  137.                                                     {" 437 "                },
  138.                                                     {" 22 inches "          },
  139.                                                     {" Graphics "           },
  140.                                                     {" Disable "            },
  141.                                                     {" CR = CR "            },
  142.                                                     {" Disable "            },
  143.                                                     {" Disable "            },    // 46 New - AutoPowerOn
  144.                                                     {" 3.0 mm "             },    // 47 New - BJ Top Margin
  145.                                                     {" 8.5 mm "             },    // 48 New - LQ Top Margin
  146.                                                     {" Disable "            },    // 49 New - BJ Font Lock
  147.                                                     {" Disable "            }     // 50 New - LQ Font Lock
  148.                         };
  149.  
  150. static unsigned char    choice_Eu_LQ[WIN4_MENU][WIN4_MENU_W] = 
  151.                         {
  152.                                                     {" LQ emulation (LQ) "  },
  153.                                                     {" A4 "                 },
  154.                                                     {" High Quality "       },
  155.                                                     {" Disable "            },
  156.                                                     {" Disable "            },
  157.                                                     {" Courier "            },
  158.                                                     {" 437 "                },
  159.                                                     {" 12 inches "          },
  160.                                                     {" Set 2 "              },
  161.                                                     {" Disable "            },
  162.                                                     {" Disable "            },
  163.                                                     {" CR = CR "            },
  164.                                                     {" LF = LF "            },
  165.                                                     {" Disable "            },
  166.                                                     {" U.S.A. "             },
  167.                                                     {" LPT1 "               },
  168.                                                     {" Roman "              },
  169.                                                     {" 437 "                },
  170.                                                     {" 22 inches "          },
  171.                                                     {" Graphics "           },
  172.                                                     {" Disable "            },
  173.                                                     {" CR = CR "            },
  174.                                                     {" BJC-240 "            },
  175.                                                     {" LQ emulation (LQ) "  },
  176.                                                     {" A4 "                 },
  177.                                                     {" High Quality "       },
  178.                                                     {" Disable "            },
  179.                                                     {" Disable "            },
  180.                                                     {" Courier "            },
  181.                                                     {" 437 "                },
  182.                                                     {" 12 inches "          },
  183.                                                     {" Set 2 "              },
  184.                                                     {" Disable "            },
  185.                                                     {" Disable "            },
  186.                                                     {" CR = CR "            },
  187.                                                     {" LF = LF "            },
  188.                                                     {" Disable "            },
  189.                                                     {" U.S.A. "             },
  190.                                                     {" LPT1 "               },
  191.                                                     {" Roman "              },
  192.                                                     {" 437 "                },
  193.                                                     {" 22 inches "          },
  194.                                                     {" Graphics "           },
  195.                                                     {" Disable "            },
  196.                                                     {" CR = CR "            },
  197.                                                     {" Disable "            },
  198.                                                     {" Disable "            },    // 46 New - AutoPowerOn
  199.                                                     {" 3.0 mm "             },    // 47 New - BJ Top Margin
  200.                                                     {" 8.5 mm "             },    // 48 New - LQ Top Margin
  201.                                                     {" Disable "            },    // 49 New - BJ Font Lock
  202.                                                     {" Disable "            }     // 50 New - LQ Font Lock
  203.                         };
  204.  
  205. static unsigned char    choice_Eu_BJ[WIN4_MENU][WIN4_MENU_W] = 
  206.                         {
  207.                                                     {" Bubble Jet (BJ) "    },
  208.                                                     {" A4 "                 },
  209.                                                     {" High Quality "       },
  210.                                                     {" Disable "            },
  211.                                                     {" Disable "            },
  212.                                                     {" Courier "            },
  213.                                                     {" 850 "                },
  214.                                                     {" 12 inches "          },
  215.                                                     {" Set 2 "              },
  216.                                                     {" Disable "            },
  217.                                                     {" Disable "            },
  218.                                                     {" CR = CR "            },
  219.                                                     {" LF = LF "            },
  220.                                                     {" Disable "            },
  221.                                                     {" U.S.A. "             },
  222.                                                     {" LPT1 "               },
  223.                                                     {" Roman "              },
  224.                                                     {" 437 "                },
  225.                                                     {" 22 inches "          },
  226.                                                     {" Graphics "           },
  227.                                                     {" Disable "            },
  228.                                                     {" CR = CR "            },
  229.                                                     {" BJC-240 "            },
  230.                                                     {" Bubble Jet (BJ) "    },
  231.                                                     {" A4 "                 },
  232.                                                     {" High Quality "       },
  233.                                                     {" Disable "            },
  234.                                                     {" Disable "            },
  235.                                                     {" Courier "            },
  236.                                                     {" 850 "                },
  237.                                                     {" 12 inches "          },
  238.                                                     {" Set 2 "              },
  239.                                                     {" Disable "            },
  240.                                                     {" Disable "            },
  241.                                                     {" CR = CR "            },
  242.                                                     {" LF = LF "            },
  243.                                                     {" Disable "            },
  244.                                                     {" U.S.A. "             },
  245.                                                     {" LPT1 "               },
  246.                                                     {" Roman "              },
  247.                                                     {" 437 "                },
  248.                                                     {" 22 inches "          },
  249.                                                     {" Graphics "           },
  250.                                                     {" Disable "            },
  251.                                                     {" CR = CR "            },
  252.                                                     {" Disable "            },
  253.                                                     {" Disable "            },    // 46 New - AutoPowerOn
  254.                                                     {" 3.0 mm "             },    // 47 New - BJ Top Margin
  255.                                                     {" 8.5 mm "             },    // 48 New - LQ Top Margin
  256.                                                     {" Disable "            },    // 49 New - BJ Font Lock
  257.                                                     {" Disable "            }     // 50 New - LQ Font Lock
  258.                         };
  259.  
  260. static unsigned char    choice_As_BJ[WIN4_MENU][WIN4_MENU_W] = 
  261.                         {
  262.                                                     {" Bubble Jet (BJ) "    },
  263.                                                     {" A4 "                 },
  264.                                                     {" High Quality "       },
  265.                                                     {" Disable "            },
  266.                                                     {" Disable "            },
  267.                                                     {" Courier "            },
  268.                                                     {" 437 "                },
  269.                                                     {" 12 inches "          },
  270.                                                     {" Set 2 "              },
  271.                                                     {" Disable "            },
  272.                                                     {" Disable "            },
  273.                                                     {" CR = CR "            },
  274.                                                     {" LF = LF "            },
  275.                                                     {" Disable "            },
  276.                                                     {" U.S.A. "             },
  277.                                                     {" LPT1 "               },
  278.                                                     {" Roman "              },
  279.                                                     {" 437 "                },
  280.                                                     {" 22 inches "          },
  281.                                                     {" Graphics "           },
  282.                                                     {" Disable "            },
  283.                                                     {" CR = CR "            },
  284.                                                     {" BJC-240 "            },
  285.                                                     {" Bubble Jet (BJ) "    },
  286.                                                     {" A4 "                 },
  287.                                                     {" High Quality "       },
  288.                                                     {" Disable "            },
  289.                                                     {" Disable "            },
  290.                                                     {" Courier "            },
  291.                                                     {" 437 "                },
  292.                                                     {" 12 inches "          },
  293.                                                     {" Set 2 "              },
  294.                                                     {" Disable "            },
  295.                                                     {" Disable "            },
  296.                                                     {" CR = CR "            },
  297.                                                     {" LF = LF "            },
  298.                                                     {" Disable "            },
  299.                                                     {" U.S.A. "             },
  300.                                                     {" LPT1 "               },
  301.                                                     {" Roman "              },
  302.                                                     {" 437 "                },
  303.                                                     {" 22 inches "          },
  304.                                                     {" Graphics "           },
  305.                                                     {" Disable "            },
  306.                                                     {" CR = CR "            },
  307.                                                     {" Disable "            },
  308.                                                     {" Disable "            },    // 46 New - AutoPowerOn
  309.                                                     {" 3.0 mm "             },    // 47 New - BJ Top Margin
  310.                                                     {" 8.5 mm "             },    // 48 New - LQ Top Margin
  311.                                                     {" Disable "            },    // 49 New - BJ Font Lock
  312.                                                     {" Disable "            }     // 50 New - LQ Font Lock
  313.                         };
  314.  
  315. #define    choice_default        choice_US_LQ       // Default Setting //
  316.  
  317. //    Window 0 ---------------------------------------------------------------------------
  318.  
  319. #define    WINDOW_0            "  Canon BJ Printer Setup Utility  "
  320.  
  321. //    Window 1 ---------------------------------------------------------------------------
  322.  
  323. static struct frame_def    menu_bar[] = 
  324.                            {
  325.                                         { " Exit<F10> ",    MenuBar0,    EXIT_KEY    },
  326.                                         { FRAME_END                                  },
  327.                                         { " Status<F5> ",   MenuBar3,    STATUS_KEY  },
  328.                                         { FRAME_END                                  },
  329.                                         { " Send<F6> ",     MenuBar2,    SEND_KEY    },
  330.                                         { FRAME_END                                  },
  331.                                         { " Default<F7> ",  MenuBar4,    DEFAULT_KEY },
  332.                                         { FRAME_END                                  },
  333.                                         { " About<F8> ",    MenuBar1,    ABOUT_KEY   },
  334.                                         { FRAME_END                                  },
  335.                                         { " Help<F1> ",     MenuBar5,    HELP_USE_KEY},
  336.                                         { FRAME_END                                  },
  337.                                         { FRAME_END                                  }
  338.                           };
  339.  
  340. #define MENU_0_T        " Exit this program "
  341. #define MENU_0_OK        "\n   @fd2[ OK ]"
  342. #define MENU_0_CA        "     @fd2[ Cancel ]  \n\n"
  343.  
  344. #define MENU_1_T        " About this program "
  345. #define MENU_1_1          "\n              Canon BJ Printer Setup Utility             \n"
  346. #define MENU_1_2            "               Version 1.10 [June 12, 1996]            \n\n"
  347. #define MENU_1_3            " Copyright (c) 1995, 1996 Canon Information Systems, Inc.\n"
  348. #define MENU_1_4            "            Copyright (c) 1995, 1996 Canon Inc.          \n"
  349. #define MENU_1_5            "                    All Rights Reserved                  \n\n"
  350. #define MENU_1_OK           "                           @f[ OK ]                      "
  351.  
  352. #define MENU_2_T        " Send Setting Parameters "
  353. #define MENU_2_OK        "\n   @fd2[ OK ]"
  354. #define MENU_2_CA        "       @fd2[ Cancel ]  \n\n"
  355.  
  356. #define MENU_3_T        " Printer's Status "
  357. #define MENU_3_OK        "\n   @fd2[ OK ]"
  358. #define MENU_3_CA        "    @fd2[ Cancel ]  \n\n"
  359. static unsigned char    ErrorMsg[10][WIN4_MENU_W] = {
  360.                                             {" Printer Time Out "},
  361.                                             {" Not Used         "},
  362.                                             {" Not Used         "},
  363.                                             {" I/O Error        "},
  364.                                             {" Printer Selected "},
  365.                                             {" Out of Paper     "},
  366.                                             {" Acknowledge      "},
  367.                                             {" Printer NOT Busy "},
  368.                                             {" Printer NO Error "}
  369.                         };
  370. #define MENU_3_OK2            "\n          @f[ OK ]          "
  371. #define PRINTER_ERROR    " Please check your printer!! "
  372.  
  373. #define MENU_4_T        " Change to Default settings "
  374. #define MENU_4_OK        "\n    @fd2[ OK ]"
  375. #define MENU_4_CA        "         @fd2[ Cancel ]   \n\n"
  376.  
  377. #define MENU_5_T        " How to use Help "
  378. #define MENU_5_1          "\n When F1 key is pressed or the right button is clicked,\n"
  379. #define MENU_5_2            " help messages of selected field appear.               \n\n"
  380. #define MENU_5_3            " When ESC key is pressed, this help exits.             \n\n"
  381. #define MENU_5_OK           "                         @f[ OK ]                      "
  382.  
  383. //    Window 2 ---------------------------------------------------------------------------
  384.  
  385. #define WINDOW_2_TITLE    "Setting Mode"
  386.  
  387. #define WINDOW_2_5               "    Printer =%s\n"
  388. #define WINDOW_2_5_MP            "Printer =%s\n"
  389. #define WINDOW_2_5_C30           " Printer =%s\n"
  390. #define WINDOW_2_4       "@fd2h22[ Printer...       Ctrl-P ]\n"
  391. #define WINDOW_2_0       "@fd2h22[ Setting Mode...  Ctrl-M ]\n"
  392. #define WINDOW_2_1       "@fd2h22[ Open File...     Ctrl-O ]\n"
  393. #define WINDOW_2_2       "@fd2h22[ Save File...     Ctrl-S ]\n"
  394. #define WINDOW_2_3       "@fd2h22[ Delete File...   Ctrl-D ]\n"
  395.  
  396. #define WINDOW_2_0_S0   " MultiPASS C2500"
  397. #define WINDOW_2_0_S30  " MultiPASS C30 "
  398. #define WINDOW_2_0_SIF  " CFX-B380IF "
  399. #define WINDOW_2_0_S1   " BJC-4100 "
  400. #define WINDOW_2_0_S2   " BJC-210 "
  401. #define WINDOW_2_0_S3   " BJC-80 "
  402. #define WINDOW_2_0_S4   " BJC-240 "
  403. #define WINDOW_2_0_S5   " BJC-4200 "
  404. #define WINDOW_2_0_S6   " BJC-4550 "
  405.  
  406. #define WINDOW_2_4_H    " Change Printer "
  407. #define WINDOW_2_0_H    " Change Setting Mode "
  408. #define WINDOW_2_1_H    " Read Parameters "
  409. #define WINDOW_2_2_H    " Store Parameters "
  410. #define WINDOW_2_3_H    " Delete a File "
  411.  
  412. #define WINDOW_2_1_O    " Select to open a Setting file "
  413. #define WINDOW_2_2_S    " Select to save a Setting file "
  414. #define WINDOW_2_3_D    " Select to delete a Setting file "
  415.  
  416. #define MENU_2_D_T      " Delete? "
  417. #define MENU_2_D_F      "\n  %s\n"
  418. #define MENU_2_D_OK     "\n        @fd2[ OK ]"
  419. #define MENU_2_D_CA     "       @fd2[ Cancel ]    \n\n"
  420.  
  421. static struct slug_list win2_menu_printer[] = {
  422.             {    "              BJC-4550",                       NULL,      NULL, PrinterSet,   98},
  423.             {    "              BJC-4200",                       NULL,      NULL, PrinterSet,   97},
  424.             {    "              BJC-240 ",                       NULL,      NULL, PrinterSet,   96},
  425. ////!T. 4/16/96            {    "              BJC-80  ",                       NULL,      NULL, PrinterSet,   95},
  426.             {    "              BJC-210 ",                       NULL,      NULL, PrinterSet,   94},
  427.             {    "              BJC-4100",                       NULL,      NULL, PrinterSet,   93},
  428.             {    "       MultiPASS C2500",                       NULL,      NULL, PrinterSet,   92},
  429.             {    "       MultiPASS C30  ",                       NULL,      NULL, PrinterSet,  190},
  430.             {    "            CFX-B380IF",                       NULL,      NULL, PrinterSet,  191},
  431.             {                        NULL,           " Printer Name ",      NULL, FNULL,         0}
  432. };
  433. #define     MAX_PRINTER            8           // Number of printer models w/o BJC-80
  434.  
  435. static struct slug_list win2_menu[] = {
  436.             {    "     LQ emulation (LQ)",        " LQ mode setting ",      NULL, ModeSet,      90},
  437.             {    "       Bubble Jet (BJ)",        " BJ mode setting ",      NULL, ModeSet,      91},
  438.             {                        NULL,           " Setting Mode ",      NULL, FNULL,         0}
  439. };
  440.  
  441. //    Window 3 ---------------------------------------------------------------------------
  442.  
  443. static struct slug_list ok_menu1[] = {
  444.             {    "                    OK",       " Turn off printer ",      NULL, SelectDisplay,     P1A},
  445.             {    "                Cancel",     " Cancel to turn off ",      NULL, SelectDisplay,     PNG},
  446.             {                        NULL,              " Power Off ",      NULL, FNULL,               0}
  447. };
  448. static struct slug_list ok_menu2[] = {
  449.             {    "                    OK",          " Reset printer ",      NULL, SelectDisplay,     P2A},
  450.             {    "                Cancel",        " Cancel to reset ",      NULL, SelectDisplay,     PNG},
  451.             {                        NULL,          " Reset Printer ",      NULL, FNULL,               0}
  452. };
  453. static struct slug_list ok_menu3[] = {
  454.             {    "                    OK",            " Eject paper ",      NULL, SelectDisplay,     P3A},
  455.             {    "                Cancel",        " Cancel to eject ",      NULL, SelectDisplay,     PNG},
  456.             {                        NULL,             " Eject Page ",      NULL, FNULL,               0}
  457. };
  458. static struct slug_list ok_menu4[] = {
  459.             {    "LQ Emulation mode (LQ)",            " Set LQ mode ",      NULL, SelectDisplay,     P4A},
  460.             {    "  Bubble Jet mode (BJ)",            " Set BJ mode ",      NULL, SelectDisplay,     P4B},
  461.             {    "   Automatic Selection",     " Set auto selection ",      NULL, SelectDisplay,     P4C},
  462.             {    "                Cancel",     " Cancel to set mode ",      NULL, SelectDisplay,     PNG},
  463.             {                        NULL,   " Printer Control Mode ",      NULL, FNULL,               0}
  464. };
  465. static struct slug_list ok_menu5[] = {
  466.             {    "        Ripple Pattern",   " Print for characters ",      NULL, SelectDisplay,     P5A},
  467. #if 0
  468.             {    "                Test B",       " Print for Test B ",      NULL, SelectDisplay,     P5B},
  469.             {    "                Test C",       " Print for Test C ",      NULL, SelectDisplay,     P5C},
  470. #endif
  471.             {    "         Demonstration",         " Print for demo ",      NULL, SelectDisplay,     P5D},
  472.             {    "        Nozzle pattern",       " Print for nozzle ",      NULL, SelectDisplay,     P5E},
  473.             {    "                Cancel",        " Cancel to print ",      NULL, SelectDisplay,     PNG},
  474.             {                        NULL,     " Test Print Pattern ",      NULL, FNULL,               0}
  475. };
  476. // SK, 6/4/96 - to remove demo print option for MP B380IF
  477. static struct slug_list ok_menu5_B380IF[] = {
  478.             {    "        Ripple Pattern",   " Print for characters ",      NULL, SelectDisplay,     P5A},
  479. #if 0
  480.             {    "                Test B",       " Print for Test B ",      NULL, SelectDisplay,     P5B},
  481.             {    "                Test C",       " Print for Test C ",      NULL, SelectDisplay,     P5C},
  482.             {    "         Demonstration",         " Print for demo ",      NULL, SelectDisplay,     P5D},
  483. #endif
  484.             {    "        Nozzle pattern",       " Print for nozzle ",      NULL, SelectDisplay,     P5E},
  485.             {    "                Cancel",        " Cancel to print ",      NULL, SelectDisplay,     PNG},
  486.             {                        NULL,     " Test Print Pattern ",      NULL, FNULL,               0}
  487. };
  488. static struct slug_list ok_menu5_80[] = {
  489.             {    "         Demonstration",         " Print for demo ",      NULL, SelectDisplay,     P5D},
  490.             {    "        Nozzle pattern",       " Print for nozzle ",      NULL, SelectDisplay,     P5E},
  491.             {    "                Cancel",        " Cancel to print ",      NULL, SelectDisplay,     PNG},
  492.             {                        NULL,     " Test Print Pattern ",      NULL, FNULL,               0}
  493. };
  494. static struct slug_list ok_menu6[] = {
  495.             {    "                    OK", " Print current settings ",      NULL, SelectDisplay,     P6A},
  496.             {    "                Cancel",        " Cancel to print ",      NULL, SelectDisplay,     PNG},
  497.             {                        NULL,         " Print Settings ",      NULL, FNULL,               0}
  498. };
  499. static struct slug_list ok_menu7[] = {
  500.             {    "                    OK",    " Go replacement mode ",      NULL, SelectDisplay,     P7A},
  501.             {    "                Cancel",       " Cancel to change ",      NULL, SelectDisplay,     PNG},
  502.             {                        NULL,   " Change Ink Cartridge ",      NULL, FNULL,               0}
  503. };
  504. static struct slug_list ok_menu8[] = {
  505.             {    "                    OK",       " Perform cleaning ",      NULL, SelectDisplay,     P8A},
  506.             {    "                Cancel",        " Cancel to clean ",      NULL, SelectDisplay,     PNG},
  507.             {                        NULL,         " Clean Ink Head ",      NULL, FNULL,               0}
  508. };
  509. static struct slug_list ok_menu8_80[] = {
  510.             {    "       Normal cleaning",       " Perform cleaning ",      NULL, SelectDisplay,     P8A},
  511.             {    "              Flashing",       " Perform flashing ",      NULL, SelectDisplay,     P8B},
  512.             {    "                Cancel",        " Cancel to clean ",      NULL, SelectDisplay,     PNG},
  513.             {                        NULL,         " Clean Ink Head ",      NULL, FNULL,               0}
  514. };
  515. static struct slug_list ok_menu9[] = {
  516.             {    "      U.S.A. - LQ mode",  " Set to LQ mode in USA ",      NULL, SelectDisplay,     P9B},
  517.             {    "      U.S.A. - BJ mode",  " Set to BJ mode in USA ",      NULL, SelectDisplay,     P9C},
  518.             {    "      Europe - LQ mode",    " Set to LQ in Europe ",      NULL, SelectDisplay,     P9D},
  519.             {    "      Europe - BJ mode",    " Set to BJ in Europe ",      NULL, SelectDisplay,     P9E},
  520.             {    "        Asia - LQ mode", " Set to LQ mode in Asia ",      NULL, SelectDisplay,     P9D},
  521.             {    "        Asia - BJ mode", " Set to BJ mode in Asia ",      NULL, SelectDisplay,     P9F},
  522.             {    "                Cancel",   " Cancel to Initialize ",      NULL, SelectDisplay,     PNG},
  523.             {                        NULL,          " Preset Status ",      NULL, FNULL,               0}
  524. };
  525. static struct slug_list ok_menu9_80[] = {
  526.             {    "               Factory",    " Set to Factory mode ",      NULL, SelectDisplay,     P9A},
  527.             {    "                Cancel",   " Cancel to Initialize ",      NULL, SelectDisplay,     PNG},
  528.             {                        NULL,          " Preset Status ",      NULL, FNULL,               0}
  529. };
  530. static struct slug_list ok_menu0[] = {
  531.             {    "         Dump mode On ",          " Set Dump mode ",      NULL, SelectDisplay,     P0A},
  532.             {    "         Dump mode Off",        " Reset Dump mode ",      NULL, SelectDisplay,     P0A},
  533.             {    "                Cancel",    " Cancel to set/reset ",      NULL, SelectDisplay,     PNG},
  534.             {                        NULL,              " Dump Mode ",      NULL, FNULL,               0}
  535. };
  536.  
  537. static struct slug_list win3_menu[] = {
  538.  
  539.             {    "@1.Power Off            ",       " Turn off printer ",    ok_menu1,    FNULL,      HE1},
  540.             {    "@2.Reset Printer        ",          " Reset printer ",    ok_menu2,    FNULL,      HE2},
  541.             {    "@3.Eject Page           ",            " Eject paper ",    ok_menu3,    FNULL,      HE3},
  542.             {    "@4.Printer Control Mode ",    " Switch control mode ",    ok_menu4,    FNULL,      HE4},
  543.             {    "@5.Printer Test Pattern ",     " Perform test print ",    ok_menu5,    FNULL,      HE5},
  544.             {    "@6.Print Settings       ", " Print current settings ",    ok_menu6,    FNULL,      HE6},
  545.             {    "@7.Change Ink Cartridge ",      " Change print head ",    ok_menu7,    FNULL,      HE7},
  546.             {    "@8.Clean Ink Head       ",       " Perform cleaning ",    ok_menu8,    FNULL,      HE8},
  547.             {    "@9.Preset Status        ",    " Initialize settings ",    ok_menu9,    FNULL,      HE9},
  548.             {                          NULL,         " Printer Action ",        NULL,    FNULL,        0}
  549. };
  550. // for MP B380IF; removing test print option because of firmware problems - SK, 5/15/96
  551. // correction - remove only demo print option, not the whole test print option - SK, 6/4/96
  552. static struct slug_list win3_menu_B380IF[] = {
  553.  
  554.             {    "@1.Power Off            ",       " Turn off printer ",    ok_menu1,    FNULL,      HE1},
  555.             {    "@2.Reset Printer        ",          " Reset printer ",    ok_menu2,    FNULL,      HE2},
  556.             {    "@3.Eject Page           ",            " Eject paper ",    ok_menu3,    FNULL,      HE3},
  557.             {    "@4.Printer Control Mode ",    " Switch control mode ",    ok_menu4,    FNULL,      HE4},
  558.             {    "@5.Printer Test Pattern ",     " Perform test print ",    ok_menu5_B380IF,    FNULL,      HE5},
  559.             {    "@6.Print Settings       ", " Print current settings ",    ok_menu6,    FNULL,      HE6},
  560.             {    "@7.Change Ink Cartridge ",      " Change print head ",    ok_menu7,    FNULL,      HE7},
  561.             {    "@8.Clean Ink Head       ",       " Perform cleaning ",    ok_menu8,    FNULL,      HE8},
  562.             {    "@9.Preset Status        ",    " Initialize settings ",    ok_menu9,    FNULL,      HE9},
  563.             {                          NULL,         " Printer Action ",        NULL,    FNULL,        0}
  564. };
  565. static struct slug_list win3_menu_4200[] = {
  566.  
  567.             {    "@1.Power Off            ",       " Turn off printer ",    ok_menu1,    FNULL,      HE1},
  568.             {    "@2.Reset Printer        ",          " Reset printer ",    ok_menu2,    FNULL,      HE2},
  569.             {    "@3.Eject Page           ",            " Eject paper ",    ok_menu3,    FNULL,      HE3},
  570.             {    "@4.Printer Control Mode ",    " Switch control mode ",    ok_menu4,    FNULL,      HE4},
  571.             {    "@5.Printer Test Pattern ",     " Perform test print ",    ok_menu5,    FNULL,      HE5},
  572.             {    "@6.Print Settings       ", " Print current settings ",    ok_menu6,    FNULL,      HE6},
  573.             {    "@7.Change Ink Cartridge ",      " Change print head ",    ok_menu7,    FNULL,      HE7},
  574.             {    "@8.Clean Ink Head       ",       " Perform cleaning ",    ok_menu8,    FNULL,      HE8},
  575.             {    "@9.Preset Status        ",    " Initialize settings ",    ok_menu9,    FNULL,      HE9},
  576.             {    "@0.Dump Mode            ",    " Set/Reset Dump mode ",    ok_menu0,    FNULL,      HE0},
  577.             {                          NULL,         " Printer Action ",        NULL,    FNULL,        0}
  578. };
  579. static struct slug_list win3_menu_210[] = {
  580.  
  581.             {    "@1.Power Off            ",       " Turn off printer ",    ok_menu1,    FNULL,      HE1},
  582.             {    "@2.Reset Printer        ",          " Reset printer ",    ok_menu2,    FNULL,      HE2},
  583.             {    "@3.Eject Page           ",            " Eject paper ",    ok_menu3,    FNULL,      HE3},
  584.             {    "@4.Printer Control Mode ",    " Switch control mode ",    ok_menu4,    FNULL,      HE4},
  585.             {    "@5.Printer Test Pattern ",     " Perform test print ",    ok_menu5,    FNULL,      HE5},
  586.             {    "@6.Print Settings       ", " Print current settings ",    ok_menu6,    FNULL,      HE6},
  587.             {    "@7.Change Ink Cartridge ",  " Not necessary to send ",        NULL,    FNULL,        0},
  588.             {    "@8.Clean Ink Head       ",       " Perform cleaning ",    ok_menu8,    FNULL,      HE8},
  589.             {    "@9.Preset Status        ",    " Initialize settings ",    ok_menu9,    FNULL,      HE9},
  590.             {                          NULL,         " Printer Action ",        NULL,    FNULL,        0}
  591. };
  592. static struct slug_list win3_menu_240[] = {
  593.  
  594.             {    "@1.Power Off            ",       " Turn off printer ",    ok_menu1,    FNULL,      HE1},
  595.             {    "@2.Reset Printer        ",          " Reset printer ",    ok_menu2,    FNULL,      HE2},
  596.             {    "@3.Eject Page           ",            " Eject paper ",    ok_menu3,    FNULL,      HE3},
  597.             {    "@4.Printer Control Mode ",    " Switch control mode ",    ok_menu4,    FNULL,      HE4},
  598.             {    "@5.Printer Test Pattern ",     " Perform test print ",    ok_menu5,    FNULL,      HE5},
  599.             {    "@6.Print Settings       ", " Print current settings ",    ok_menu6,    FNULL,      HE6},
  600.             {    "@7.Change Ink Cartridge ",  " Not necessary to send ",        NULL,    FNULL,        0},
  601.             {    "@8.Clean Ink Head       ",       " Perform cleaning ",    ok_menu8,    FNULL,      HE8},
  602.             {    "@9.Preset Status        ",    " Initialize settings ",    ok_menu9,    FNULL,      HE9},
  603.             {    "@0.Dump Mode            ",    " Set/Reset Dump mode ",    ok_menu0,    FNULL,      HE0},
  604.             {                          NULL,         " Printer Action ",        NULL,    FNULL,        0}
  605. };
  606. static struct slug_list win3_menu_80[] = {
  607.  
  608.             {    "@1.Power Off            ",       " Turn off printer ",    ok_menu1,    FNULL,      HE1},
  609.             {    "@2.Reset Printer        ",          " Reset printer ",    ok_menu2,    FNULL,      HE2},
  610.             {    "@3.Eject Page           ",            " Eject paper ",    ok_menu3,    FNULL,      HE3},
  611.             {    "@4.Printer Control Mode ",    " Switch control mode ",    ok_menu4,    FNULL,      HE4},
  612.             {    "@5.Printer Test Pattern ",     " Perform test print ",    ok_menu5_80, FNULL,      HE5},
  613.             {    "@6.Print Settings       ", " Print current settings ",    ok_menu6,    FNULL,      HE6},
  614.             {    "@7.Change Ink Cartridge ",      " Change print head ",    ok_menu7,    FNULL,      HE7},
  615.             {    "@8.Clean Ink Head       ",       " Perform cleaning ",    ok_menu8_80, FNULL,      HE8},
  616.             {    "@9.Preset Status        ",    " Initialize settings ",    ok_menu9_80, FNULL,      HE9},
  617.             {                          NULL,         " Printer Action ",        NULL,    FNULL,        0}
  618. };
  619.  
  620. #define    WINDOW_3_TITLE    "Printer Action"
  621.  
  622. //    Window 4 ---------------------------------------------------------------------------
  623.  
  624. #define    WINDOW_4_TITLE    "Parameter Settings"
  625.  
  626. #define    WINDOW_4_0                "    Parameter Setting Mode =%s\n"
  627. #define    WINDOW_4_1         "@fd2h1[ Paper Selection           :###################]\n"
  628. #define    WINDOW_4_2         "@fd2h7[ Print Mode                :###################]\n"
  629. #define    WINDOW_4_3         "@fd2h1[ Smoothing                 :###################]\n"
  630. #define    WINDOW_4_35        "@fd2h4[ Reduction                 :###################]\n"
  631. #define    WINDOW_4_36       "@fd2h14[ Automatic Power On        :###################]\n"
  632. #define    WINDOW_4_4        "@fd2h13[ Automatic Power Off       :###################]\n"
  633. #define    WINDOW_4_5_B       "@fd2h1[ Font (BJ)                 :###################]\n"
  634. #define    WINDOW_4_5_L       "@fd2h1[ Font (LQ)                 :###################]\n"
  635. #define    WINDOW_4_6_B       "@fd2h3[ Code Page (BJ)            :###################]\n"
  636. #define    WINDOW_4_6_L       "@fd2h3[ Code Page (LQ)            :###################]\n"
  637. #define    WINDOW_4_7_B       "@fd2h6[ Page Length (BJ)          :###################]\n"
  638. #define    WINDOW_4_7_L       "@fd2h6[ Page Length (LQ)          :###################]\n"
  639. #define    WINDOW_4_7_L_80     "@fdh6[ Page Length (LQ)          : ───               ]\n"
  640. #define    WINDOW_4_8_B       "@fd2h2[ Character Set (BJ)        :###################]\n"
  641. #define    WINDOW_4_8_L       "@fd2h2[ Character Set (LQ)        :###################]\n"
  642. #define    WINDOW_4_9_B       "@fd2h1[ Text Scale (BJ)           :###################]\n"
  643. #define    WINDOW_4_9_L       "@fd2h1[ Text Scale (LQ)           :###################]\n"
  644. #define    WINDOW_4_10       "@fd2h10[ Download Buffer           :###################]\n"
  645. #define    WINDOW_4_11_B      "@fd2h1[ Automatic Line Feed (BJ)  :###################]\n"
  646. #define    WINDOW_4_11_L      "@fd2h1[ Automatic Line Feed (LQ)  :###################]\n"
  647. #define    WINDOW_4_12       "@fd2h13[ Automatic Carriage Return :###################]\n"
  648. #define    WINDOW_4_12_C      "@fdh13[ Automatic Carriage Return : ───               ]\n"
  649. #define    WINDOW_4_13       "@fd2h11[ Alternate Graphic Mode    :###################]\n"
  650. #define    WINDOW_4_13_C      "@fdh11[ Alternate Graphic Mode    : ───               ]\n"
  651. #define    WINDOW_4_14        "@fd2h1[ International Character   :###################]\n"
  652. #define    WINDOW_4_14_C       "@fdh1[ International Character   : ───               ]\n"
  653. #define    WINDOW_4_TOP_B     "@fd2h2[ Top Margin (BJ)           :###################]\n"
  654. #define    WINDOW_4_TOP_L     "@fd2h2[ Top Margin (LQ)           :###################]\n"
  655. #define    WINDOW_4_LOCK_B    "@fd2h8[ Font Lock (BJ)            :###################]\n"
  656. #define    WINDOW_4_LOCK_L    "@fd2h8[ Font Lock (LQ)            :###################]\n"
  657. #define    WINDOW_4_15        "@fd2h4[ Printer Port              :###################]\n"
  658.  
  659. #define    WINDOW_4_2_H    " Bubble Jet (BJ) mode setting only "
  660. #define    WINDOW_4_3_H    " LQ emulation (LQ) mode setting only "
  661. #define    WINDOW_4_4_H    " To switch this entry, you must change port "
  662. #define    WINDOW_4_5_H    " Common setting (both LQ and BJ) "
  663. #define    WINDOW_4_6_H    " Independent setting (LQ or BJ) "
  664.  
  665. #define    WINDOW_4_0_S0   " LQ emulation (LQ) "
  666. #define    WINDOW_4_0_S0_N 19
  667. #define    WINDOW_4_0_S1   " Bubble Jet (BJ) "
  668. #define    WINDOW_4_0_S1_N 17
  669.  
  670. #define    WINDOW_4_1_S    " A4 , Letter , COM 10 Envelope , DL Envelope "
  671. #define    WINDOW_4_1_80   " A4 , Letter "
  672. #define    WINDOW_4_1_2500 " A4 , Letter , COM 10 Envelope , DL Envelope , B5 , Legal "
  673. #define    WINDOW_4_2_S    " High Quality , High Speed , Fine "
  674. #define    WINDOW_4_2_240  " High Quality , High Speed "
  675. #define    WINDOW_4_3_S    " Enable , Disable "
  676. #define    WINDOW_4_35_S   " Disable , Two-thirds , One-half "
  677. #define    WINDOW_4_4_S    " Disable , 1 minute , 10 minutes , 30 minutes , 60 minutes "
  678. #define    WINDOW_4_4_80   " Disable , 30 minutes "
  679. #define    WINDOW_4_5_S    " Roman , Gothic , Courier , Prestige , Script "
  680. #define    WINDOW_4_5_80   " Roman , Gothic , Courier , Prestige , Script , Draft "
  681. #define    WINDOW_4_6_S    " 437 , 850 , 863 , 865 , 860 , 857 "
  682. #define    WINDOW_4_6_240  " 437 , 850 , 863 , 865 , 860 , 852 "
  683. #define    WINDOW_4_6_80   " 437 , 850 , 863 , 865 , 860 , 852 , 857 , 855, 864 , 869 "
  684. #define    WINDOW_4_7_S0   " 11 inches , 12 inches , 22 inches "
  685. #define    WINDOW_4_7_S1   " 11 inches , 12 inches "
  686. #define    WINDOW_4_8_S0   " Italic , Graphics "
  687. #define    WINDOW_4_8_S1   " Set 1 , Set 2 "
  688. #define    WINDOW_4_11_S   " CR = CR + LF , CR = CR "
  689. #define    WINDOW_4_12_S   " LF = LF + CR , LF = LF "
  690. #define    WINDOW_4_14_S   " Japan , Norway , Denmark 2 , Spain 2 , Latin America , Korea , Legal , U.S.A. , France , Germany , U.K. , Denmark 1 , Sweden , Italy , Spain 1 "
  691. #define    WINDOW_4_14_80  " Spain , U.S.A. , France , Germany , U.K. , Denmark , Sweden , Italy "
  692. #define    WINDOW_4_15_S   " LPT1 , LPT2 "
  693. #define    WINDOW_4_TOP_S  " 3.0 mm , 5.0 mm , 8.5 mm , 10.0 mm "
  694.  
  695. #define    BUBBLE_JET              'B'
  696.  
  697. #define    PAPER_ORDER              1
  698. #define    PAPER_ORDER_3            3
  699. #define    PAPER_A4                'A'
  700. #define    PAPER_10_ENVELOPE       'C'
  701. #define    PAPER_DL_ENVELOPE       'D'
  702. #define    PAPER_LETTER            'L'
  703. #define    PAPER_B5                'B'
  704. #define    PAPER_LEGAL             'g'
  705.  
  706. #define    FONT_ORDER               1
  707. #define    FONT_ROMAN              'R'
  708. #define    FONT_GOTHIC             'G'
  709. #define    FONT_PRESTIGE           'P'
  710. #define    FONT_SCRIPT             'S'
  711. #define    FONT_COURIER            'C'
  712. #define    FONT_DRAFT              'D'
  713.  
  714. #define    CHAR_ENABLE             'E'
  715.  
  716. #define    CHAR_SET_ITALIC         'I'
  717. #define    CHAR_SET_GRAPHIC        'G'
  718.  
  719. #define    REDUCTION_ORDER          1
  720. #define    REDUCTION_DISABLE       'D'
  721. #define    REDUCTION_TWO_THIRDS    'T'
  722. #define    REDUCTION_ONE_HALF      'O'
  723.  
  724. //    Window 5 ---------------------------------------------------------------------------
  725.  
  726. #define    WINDOW_5_TITLE    "  Tab to Move among the windows  |  Alt + Highlight  or  Arrow key to Select  "
  727.  
  728. //    ------------------------------------------------------------------------------------
  729.  
  730.