--- ./lib/Makefile.in Fri Jan 24 19:55:03 2003 +++ ../gimp-print-4.2.5/./lib/Makefile.in Thu Feb 27 15:14:02 2003 @@ -200,7 +200,7 @@ libprintut_la_SOURCES = -libprintut_la_LIBADD = @LTALLOCA@ @LTLIBOBJS@ +libprintut_la_LIBADD = @LTALLOCA@ @LTLIBOBJS@ -static noinst_HEADERS = getopt.h libprintut.h pathmax.h xmalloc.h --- ./man/Makefile.in Fri Jan 24 19:55:03 2003 +++ ../gimp-print-4.2.5/./man/Makefile.in Wed Feb 26 18:23:18 2003 @@ -233,6 +233,7 @@ GZIP_ENV = --best all: all-redirect .SUFFIXES: +.NOTPARALLEL: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps man/Makefile --- ./src/cups/genppd.c Sun Dec 22 09:54:56 2002 +++ ../gimp-print-4.2.5/./src/cups/genppd.c Wed Feb 26 18:05:39 2003 @@ -225,9 +225,27 @@ /* * Set the language... + * + * setlocale() may come from the OS libraries, not just from GNU gettext, and + * in such case it may not support some foreign languages. */ - setlocale(LC_ALL, ""); + if (setlocale(LC_ALL, "") == NULL) + { + char *locale = getenv("LANG"); + + if (locale == NULL) + locale = getenv("LANGUAGE"); /* A Linuxism, since POSIX use LANG! */ + fprintf(stderr, "genppd: locale '%s' is not supported on this platform\n", + (locale) ? locale : ""); + + /* + * Exit with 0 status because we don't want to stop the Makefile. It's just + * that this locale cannot be supported on this platform. + */ + + exit(0); + } /* * Set up the catalog --- ./src/cups/rastertoprinter.c Thu Jan 23 21:10:28 2003 +++ ../gimp-print-4.2.5/./src/cups/rastertoprinter.c Wed Feb 26 18:05:39 2003 @@ -49,6 +49,9 @@ * Include necessary headers... */ +#ifdef HAVE_CONFIG_H +#include +#endif #include #include #include --- ./src/cups/Makefile.am Sat Nov 23 20:48:55 2002 +++ ../gimp-print-4.2.5/./src/cups/Makefile.am Wed Feb 26 18:06:36 2003 @@ -39,8 +39,8 @@ cups_modeldir = $(pkgdatadir)/model AM_CFLAGS = $(GNUCFLAGS) -DEFS = @CUPS_CFLAGS@ @DEFS@ -I. -I$(srcdir) -I../.. -DCUPS_DATADIR=\"$(pkgdatadir)\" -DGIMP_PRINT_VERSION=\"$(VERSION)\" -INCLUDES = @INCLUDES@ $(LIBGIMPPRINT_CFLAGS) +DEFS = @DEFS@ -I. -I$(srcdir) -I../.. -DCUPS_DATADIR=\"$(pkgdatadir)\" -DGIMP_PRINT_VERSION=\"$(VERSION)\" +INCLUDES = @INCLUDES@ $(LIBGIMPPRINT_CFLAGS) @CUPS_CFLAGS@ LIBPRINTUT = $(top_builddir)/lib/libprintut.la LIBS = $(INTLLIBS) @LIBS@ @@ -179,12 +179,12 @@ ppd-stamp-phony: ppd-stamp-pre ppd-nonls $(PPD_NLS) ppd-stamp-pre: - -$(RM) -r ppd - -mkdir ppd + -$(RM) -rf ppd + -mkdir -p ppd ppd-nonls: genppd for language in C ; do \ - mkdir ppd/$$language ; \ + mkdir -p ppd/$$language ; \ echo "$$language:" ; \ ./genppd --prefix=ppd/$$language ; \ done @@ -195,9 +195,9 @@ $(MAKE) ; \ $(MAKE) DESTDIR= prefix=$${wdir}/catalog datadir=$${wdir}/catalog/share install for language in $(LINGUAS) ; do \ - mkdir ppd/$$language ; \ + mkdir -p ppd/$$language ; \ echo "$$language:" ; \ - LANGUAGE=$$language ./genppd --prefix=ppd/$$language --catalog=`pwd`/catalog/share/locale ; \ + LANG=$$language ./genppd --prefix=ppd/$$language --catalog=`pwd`/catalog/share/locale ; \ done $(RM) -r catalog @@ -208,7 +208,7 @@ dist-hook: for dir in commands ; do \ if test -d $(srcdir)/$$dir ; then \ - mkdir $(distdir)/$$dir; \ + mkdir -p $(distdir)/$$dir; \ for dirfile in $(srcdir)/$$dir/*; do \ if test -f $$dirfile ; then \ cp -p $$dirfile $(distdir)/$$dir; \ @@ -218,7 +218,7 @@ done clean-local: - -$(RM) -r ppd + -$(RM) -rf ppd ## Clean --- ./src/cups/Makefile.in Fri Jan 24 19:55:06 2003 +++ ../gimp-print-4.2.5/./src/cups/Makefile.in Wed Feb 26 18:06:38 2003 @@ -197,8 +197,8 @@ cups_modeldir = $(pkgdatadir)/model AM_CFLAGS = $(GNUCFLAGS) -DEFS = @CUPS_CFLAGS@ @DEFS@ -I. -I$(srcdir) -I../.. -DCUPS_DATADIR=\"$(pkgdatadir)\" -DGIMP_PRINT_VERSION=\"$(VERSION)\" -INCLUDES = @INCLUDES@ $(LIBGIMPPRINT_CFLAGS) +DEFS = @DEFS@ -I. -I$(srcdir) -I../.. -DCUPS_DATADIR=\"$(pkgdatadir)\" -DGIMP_PRINT_VERSION=\"$(VERSION)\" +INCLUDES = @INCLUDES@ $(LIBGIMPPRINT_CFLAGS) @CUPS_CFLAGS@ LIBPRINTUT = $(top_builddir)/lib/libprintut.la LIBS = $(INTLLIBS) @LIBS@ @@ -747,12 +747,12 @@ ppd-stamp-phony: ppd-stamp-pre ppd-nonls $(PPD_NLS) ppd-stamp-pre: - -$(RM) -r ppd - -mkdir ppd + -$(RM) -rf ppd + -mkdir -p ppd ppd-nonls: genppd for language in C ; do \ - mkdir ppd/$$language ; \ + mkdir -p ppd/$$language ; \ echo "$$language:" ; \ ./genppd --prefix=ppd/$$language ; \ done @@ -763,9 +763,9 @@ $(MAKE) ; \ $(MAKE) DESTDIR= prefix=$${wdir}/catalog datadir=$${wdir}/catalog/share install for language in $(LINGUAS) ; do \ - mkdir ppd/$$language ; \ + mkdir -p ppd/$$language ; \ echo "$$language:" ; \ - LANGUAGE=$$language ./genppd --prefix=ppd/$$language --catalog=`pwd`/catalog/share/locale ; \ + LANG=$$language ./genppd --prefix=ppd/$$language --catalog=`pwd`/catalog/share/locale ; \ done $(RM) -r catalog @@ -776,7 +776,7 @@ dist-hook: for dir in commands ; do \ if test -d $(srcdir)/$$dir ; then \ - mkdir $(distdir)/$$dir; \ + mkdir -p $(distdir)/$$dir; \ for dirfile in $(srcdir)/$$dir/*; do \ if test -f $$dirfile ; then \ cp -p $$dirfile $(distdir)/$$dir; \ @@ -786,7 +786,7 @@ done clean-local: - -$(RM) -r ppd + -$(RM) -rf ppd # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. --- ./src/cups/epson.c Fri Jan 24 19:51:41 2003 +++ ../gimp-print-4.2.5/./src/cups/epson.c Wed Feb 26 18:05:38 2003 @@ -67,6 +67,7 @@ #endif /* WIN32 || __EMX__ */ #ifdef __sgi +# include # include # ifndef INV_EPP_ECP_PLP # define INV_EPP_ECP_PLP 6 /* From 6.3/6.4/6.5 sys/invent.h */ @@ -85,6 +86,13 @@ void list_devices(void); void read_backchannel(int fd_out); +#ifdef __sgi +static int cpuboard = -1; /* SGI platform */ + +void find_cpuboard(void); +#endif /* __sgi */ + + /* * 'main()' - Send a file to the specified parallel port. * @@ -120,6 +128,10 @@ #endif /* HAVE_SIGACTION && !HAVE_SIGSET */ +#ifdef __sgi + find_cpuboard(); +#endif /* __sgi */ + if (argc == 1) { list_devices(); @@ -264,6 +276,63 @@ * Set any options provided... */ +#ifdef __sgi + /* + * Reading from the parallel port is supported really only on the O2. + * On the Indy, Indigo and Indigo2 the read operation will likely fail + * due to hardware incompatibilites, and on the other platforms will + * not work at all. + */ + + /* + * Indy, Indigo and Indigo2 platforms. + */ + + if (cpuboard == INV_IP20BOARD || + cpuboard == INV_IP22BOARD || + cpuboard == INV_IP26BOARD || + cpuboard == INV_IP28BOARD) + { + if (ioctl(fd_out, PLPIOMODE, PLP_BI) < 0) + { + close(fd_out); + perror("ERROR: Unable to set bidirectional Centronics mode"); + return (1); + } + if (ioctl(fd_out, PLPIOCREAD, 1) < 0) + { + close(fd_out); + perror("ERROR: Cannot enable the reads from the port"); + return (1); + } + } + + /* + * O2 platform. + */ + + else if (cpuboard == INV_IP32BOARD) + { + if (ioctl(fd_out, PLPIOMODE, PLP_ECP) < 0) + { + close(fd_out); + perror("ERROR: Unable to set bidirectional ECP mode"); + return (1); + } + if (ioctl(fd_out, PLPIOCREAD, 1) < 0) + { + close(fd_out); + perror("ERROR: Cannot enable the reads from the port"); + return (1); + } + } + + /* + * Other platforms does not support the read from the port, so do not + * even bother to initialize them. + */ + +#else tcgetattr(fd_out, &opts); opts.c_cflag |= CREAD; /* Enable reading */ @@ -272,6 +341,7 @@ /**** No options supported yet ****/ tcsetattr(fd_out, TCSANOW, &opts); +#endif /* __sgi */ } /* @@ -678,6 +748,34 @@ /* * IRIX maintains a hardware inventory of most devices... + * + * As stated in the plp(7) man page, on the Indy, Indigo and Indigo2 platforms + * there are two devices for talking to the parallel port: + * + * - /dev/plp, which supports only Centronics output mode + * - /dev/plpbi, which supports the Centronics bidirectional mode + * + * On these platforms, /dev/plp can be converted in bidirectional mode + * calling ioctl(fd, PLPIOMODE, PLP_BI) _immediately_ after the device + * has been opened. Additionally, ioctl(fd, PLPIOCREAD, 1) must be + * called to enable the read operation on the device. + * + * On the O2 platform, /dev/plp supports the full IEEE 1284-II interfaces: + * + * - Compatibility (Centronics) + * - bidirectional Enhanced Parallel Port (EPP) + * - bidirectional Extended Capabilities Port (ECP) + * + * There is no /dev/plpbi on the O2, and the bidirectional Centronics mode + * is not supported. The ioctl(fd, PLPIOMODE, ) system call can be used + * to select the parallel port operational mode (see ), and + * ioctl(fd, PLPIOCREAD, 1) can be called to enable the read operation on + * the device. + * + * On all the remaining SGI platforms, the parallel port can be opened only + * in output mode. Some platforms may support the ECP output mode, thought, + * as well as the Centronics output mode. The device on such platforms is + * named /dev/plp[n], depending on the number of parallel ports available. */ setinvent(); @@ -684,17 +782,36 @@ while ((inv = getinvent()) != NULL) { - if (inv->inv_class == INV_PARALLEL && inv->inv_type == INV_EPP_ECP_PLP) + if (inv->inv_class == INV_PARALLEL && + (inv->inv_type == INV_ONBOARD_PLP || + inv->inv_type == INV_EPP_ECP_PLP)) { /* * Standard parallel port... */ - puts("direct epson:/dev/plpbi \"EPSON\" \"Onboard Parallel Port\""); + if (cpuboard == INV_IP20BOARD || + cpuboard == INV_IP22BOARD || + cpuboard == INV_IP26BOARD || + cpuboard == INV_IP28BOARD) + puts("direct epson:/dev/plpbi \"EPSON\" \"Onboard Parallel Port\""); + else + puts("direct epson:/dev/plp \"EPSON\" \"Onboard Parallel Port\""); + } + else if (inv->inv_class == INV_PARALLEL && + inv->inv_type == INV_EPC_PLP) + { + /* + * EPC parallel port... + */ + + printf("direct epson:/dev/plp%d \"EPSON\" \"Integral EPC parallel port, Ebus slot %d\"\n", + inv->inv_controller, inv->inv_controller); } } endinvent(); + #elif defined(__sun) int i, j, n; /* Looping vars */ char device[255]; /* Device filename */ @@ -762,6 +879,42 @@ } #endif } + + +#ifdef __sgi +/* + * 'find_cpuboard()' - Find the CPU board type for this SGI machine + */ +void +find_cpuboard(void) +{ + inventory_t *inv; /* Hardware inventory info */ + + /* + * SGI platform types we could be interested in: + * + * - IP20: Indigo R4K / Indigo R4K Elan, XS, XS24 + * - IP22: Indy / Indigo2 XZ, Extreme / Indigo2 Extreme, XL / Indigo2 Impact + * - IP26: Power Indigo2 XZ, Extreme + * - IP28: Indigo2 XZ, Extreme 10000 / Indigo2 IMPACT 10000 + * - IP32: O2 + */ + + setinvent(); + + while ((inv = getinvent()) != NULL) + { + if (inv->inv_class == INV_PROCESSOR && + inv->inv_type == INV_CPUBOARD) + { + cpuboard = inv->inv_state; + break; + } + } + + endinvent(); +} +#endif /* __sgi */ /* --- ./src/cups/canon.c Sat Nov 23 20:48:55 2002 +++ ../gimp-print-4.2.5/./src/cups/canon.c Wed Feb 26 18:05:38 2003 @@ -36,6 +36,7 @@ #endif /* WIN32 || __EMX__ */ #ifdef __sgi +# include # include # ifndef INV_EPP_ECP_PLP # define INV_EPP_ECP_PLP 6 /* From 6.3/6.4/6.5 sys/invent.h */ @@ -53,7 +54,13 @@ void list_devices(void); +#ifdef __sgi +static int cpuboard = -1; /* SGI platform */ +void find_cpuboard(void); +#endif /* __sgi */ + + /* * 'main()' - Send a file to the specified parallel port. * @@ -92,6 +99,10 @@ #endif /* HAVE_SIGACTION && !HAVE_SIGSET */ +#ifdef __sgi + find_cpuboard(); +#endif /* __sgi */ + if (argc == 1) { list_devices(); @@ -236,6 +247,63 @@ * Set any options provided... */ +#ifdef __sgi + /* + * Reading from the parallel port is supported really only on the O2. + * On the Indy, Indigo and Indigo2 the read operation will likely fail + * due to hardware incompatibilites, and on the other platforms will + * not work at all. + */ + + /* + * Indy, Indigo and Indigo2 platforms. + */ + + if (cpuboard == INV_IP20BOARD || + cpuboard == INV_IP22BOARD || + cpuboard == INV_IP26BOARD || + cpuboard == INV_IP28BOARD) + { + if (ioctl(fd_out, PLPIOMODE, PLP_BI) < 0) + { + close(fd_out); + perror("ERROR: Unable to set bidirectional Centronics mode"); + return (1); + } + if (ioctl(fd_out, PLPIOCREAD, 1) < 0) + { + close(fd_out); + perror("ERROR: Cannot enable the reads from the port"); + return (1); + } + } + + /* + * O2 platform. + */ + + else if (cpuboard == INV_IP32BOARD) + { + if (ioctl(fd_out, PLPIOMODE, PLP_ECP) < 0) + { + close(fd_out); + perror("ERROR: Unable to set bidirectional ECP mode"); + return (1); + } + if (ioctl(fd_out, PLPIOCREAD, 1) < 0) + { + close(fd_out); + perror("ERROR: Cannot enable the reads from the port"); + return (1); + } + } + + /* + * Other platforms does not support the read from the port, so do not + * even bother to initialize them. + */ + +#else tcgetattr(fd_out, &opts); opts.c_cflag |= CREAD; /* Enable reading */ @@ -244,6 +312,7 @@ /**** No options supported yet ****/ tcsetattr(fd_out, TCSANOW, &opts); +#endif /* __sgi */ } /* @@ -600,9 +669,37 @@ char device[255]; /* Device filename */ inventory_t *inv; /* Hardware inventory info */ - + /* * IRIX maintains a hardware inventory of most devices... + * + * As stated in the plp(7) man page, on the Indy, Indigo and Indigo2 platforms + * there are two devices for talking to the parallel port: + * + * - /dev/plp, which supports only Centronics output mode + * - /dev/plpbi, which supports the Centronics bidirectional mode + * + * On these platforms, /dev/plp can be converted in bidirectional mode + * calling ioctl(fd, PLPIOMODE, PLP_BI) _immediately_ after the device + * has been opened. Additionally, ioctl(fd, PLPIOCREAD, 1) must be + * called to enable the read operation on the device. + * + * On the O2 platform, /dev/plp supports the full IEEE 1284-II interfaces: + * + * - Compatibility (Centronics) + * - bidirectional Enhanced Parallel Port (EPP) + * - bidirectional Extended Capabilities Port (ECP) + * + * There is no /dev/plpbi on the O2, and the bidirectional Centronics mode + * is not supported. The ioctl(fd, PLPIOMODE, ) system call can be used + * to select the parallel port operational mode (see ), and + * ioctl(fd, PLPIOCREAD, 1) can be called to enable the read operation on + * the device. + * + * On all the remaining SGI platforms, the parallel port can be opened only + * in output mode. Some platforms may support the ECP output mode, thought, + * as well as the Centronics output mode. The device on such platforms is + * named /dev/plp[n], depending on the number of parallel ports available. */ setinvent(); @@ -609,17 +706,36 @@ while ((inv = getinvent()) != NULL) { - if (inv->inv_class == INV_PARALLEL && inv->inv_type == INV_EPP_ECP_PLP) + if (inv->inv_class == INV_PARALLEL && + (inv->inv_type == INV_ONBOARD_PLP || + inv->inv_type == INV_EPP_ECP_PLP)) { /* * Standard parallel port... */ - puts("direct canon:/dev/plpbi \"CANON\" \"Onboard Parallel Port\""); + if (cpuboard == INV_IP20BOARD || + cpuboard == INV_IP22BOARD || + cpuboard == INV_IP26BOARD || + cpuboard == INV_IP28BOARD) + puts("direct canon:/dev/plpbi \"CANON\" \"Onboard Parallel Port\""); + else + puts("direct canon:/dev/plp \"CANON\" \"Onboard Parallel Port\""); + } + else if (inv->inv_class == INV_PARALLEL && + inv->inv_type == INV_EPC_PLP) + { + /* + * EPC parallel port... + */ + + printf("direct canon:/dev/plp%d \"CANON\" \"Integral EPC parallel port, Ebus slot %d\"\n", + inv->inv_controller, inv->inv_controller); } } endinvent(); + #elif defined(__sun) int i, j, n; /* Looping vars */ char device[255]; /* Device filename */ @@ -687,6 +803,42 @@ } #endif } + + +#ifdef __sgi +/* + * 'find_cpuboard()' - Find the CPU board type for this SGI machine + */ +void +find_cpuboard(void) +{ + inventory_t *inv; /* Hardware inventory info */ + + /* + * SGI platform types we could be interested in: + * + * - IP20: Indigo R4K / Indigo R4K Elan, XS, XS24 + * - IP22: Indy / Indigo2 XZ, Extreme / Indigo2 Extreme, XL / Indigo2 Impact + * - IP26: Power Indigo2 XZ, Extreme + * - IP28: Indigo2 XZ, Extreme 10000 / Indigo2 IMPACT 10000 + * - IP32: O2 + */ + + setinvent(); + + while ((inv = getinvent()) != NULL) + { + if (inv->inv_class == INV_PROCESSOR && + inv->inv_type == INV_CPUBOARD) + { + cpuboard = inv->inv_state; + break; + } + } + + endinvent(); +} +#endif /* __sgi */ /* --- ./configure.in.in Fri Jan 24 19:51:40 2003 +++ ../gimp-print-4.2.5/./configure.in.in Wed Feb 26 18:05:38 2003 @@ -476,7 +476,7 @@ if test x$ENABLE_DEBUG = xyes ; then CFLAGS="${CFLAGS:=} -g" else - CFLAGS="${CFLAGS:=} -O" + CFLAGS="${CFLAGS:=}" fi fi if test "$CC" = "gcc" ; then --- ./scripts/ltmain.sh Fri Jan 24 19:52:01 2003 +++ ../gimp-print-4.2.5/./scripts/ltmain.sh Wed Feb 26 18:29:07 2003 @@ -61,7 +61,7 @@ default_mode= help="Try \`$progname --help' for more information." magic="%%%MAGIC variable%%%" -mkdir="mkdir" +mkdir="mkdir -p" mv="mv -f" rm="rm -f" --- ./configure.in Fri Jan 24 19:51:57 2003 +++ ../gimp-print-4.2.5/./configure.in Wed Feb 26 18:05:38 2003 @@ -476,7 +476,7 @@ if test x$ENABLE_DEBUG = xyes ; then CFLAGS="${CFLAGS:=} -g" else - CFLAGS="${CFLAGS:=} -O" + CFLAGS="${CFLAGS:=} " fi fi if test "$CC" = "gcc" ; then --- ./configure Fri Jan 24 19:52:03 2003 +++ ../gimp-print-4.2.5/./configure Wed Feb 26 18:05:38 2003 @@ -8599,7 +8599,7 @@ if test x$ENABLE_DEBUG = xyes ; then CFLAGS="${CFLAGS:=} -g" else - CFLAGS="${CFLAGS:=} -O" + CFLAGS="${CFLAGS:=}" fi fi if test "$CC" = "gcc" ; then