]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Dropped the PHP module (STR #3932)
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 27 Aug 2011 09:28:30 +0000 (09:28 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Sat, 27 Aug 2011 09:28:30 +0000 (09:28 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9927 7a7537e8-13f0-0310-91df-b6672ffda945

16 files changed:
CHANGES.txt
Makedefs.in
Makefile
config-scripts/cups-scripting.m4
packaging/cups.spec.in
scripting/perl/CUPS.pm [deleted file]
scripting/perl/CUPS.xs [deleted file]
scripting/perl/Makefile.PL [deleted file]
scripting/perl/README [deleted file]
scripting/perl/test.pl [deleted file]
scripting/php/Dependencies [deleted file]
scripting/php/Makefile [deleted file]
scripting/php/README [deleted file]
scripting/php/phpcups.c [deleted file]
scripting/php/phpcups.h [deleted file]
scripting/php/phpcups.php [deleted file]

index da689cc6c61c33a6a24a50820774fbfb1299351c..58b9973db4eea4fe54e09e081370c0d92de0b15b 100644 (file)
@@ -3,6 +3,7 @@ CHANGES.txt - 1.6b1 - 2011-08-27
 
 CHANGES IN CUPS V1.6b1
 
+       - The PHP module has been removed (STR #3932)
        - The bannertops, commandtoescpx, commandtopclx, imagetops,
          imagetoraster, pdftops, rastertoescpx, rastertopclx, and texttops
          filters have been removed (STR #3930)
index 3e866befcb6e1fd84d4b3d9fc2866d22adb4d82e..07b4b3d3fe485ffdf9bcbac79491f8cb9b748de7 100644 (file)
@@ -30,7 +30,6 @@ LD            =       @LD@
 LIBTOOL                =       @LIBTOOL@
 LN             =       @LN@ -sf
 MV             =       @MV@
-PHPCONFIG      =       @PHPCONFIG@
 RANLIB         =       @RANLIB@
 RM             =       @RM@ -f
 RMDIR          =       @RMDIR@
@@ -152,8 +151,6 @@ LIBS                =       $(LINKCUPS) $(COMMONLIBS)
 OPTIM          =       @OPTIM@
 OPTIONS                =
 PAMLIBS                =       @PAMLIBS@
-PHPDIR         =       @PHPDIR@
-PHPOPTIONS     =       @PHPOPTIONS@ -I../.. `$(PHPCONFIG) --includes`
 SERVERLIBS     =       @SERVERLIBS@
 SSLFLAGS       =       @SSLFLAGS@
 SSLLIBS                =       @SSLLIBS@
index 6507667c39c8d5498481daa67e3ff4ae21033243..02bb7b1d705df29f161d4af32dc2736df1fd1e9b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,7 @@ include Makedefs
 # Directories to make...
 #
 
-DIRS   =       cups test $(BUILDDIRS) $(PHPDIR)
+DIRS   =       cups test $(BUILDDIRS)
 
 
 #
index 35fbfbeaad9ccb6203dd4aa118ce807f6785ec24..af97a94dc41398fe9b399d81abd5e6c2e7e08a61 100644 (file)
@@ -68,17 +68,6 @@ else
        AC_DEFINE(HAVE_PHP)
 fi
 
-PHPDIR=""
-if test "x$CUPS_PHP" != xno; then
-       AC_PATH_PROG(PHPCONFIG, php-config)
-
-       if test "x$PHPCONFIG" != x; then
-               PHPDIR="scripting/php"
-       fi
-fi
-
-AC_SUBST(PHPDIR)
-
 dnl Do we have Python?
 AC_ARG_WITH(python, [  --with-python           set Python interpreter for web interfaces ],
        CUPS_PYTHON="$withval",
index f0d08bfe413585a0d4026d680dc18c1e5589c6e9..84b5534f6ec1b2aa9965c738a462ca7345a94fe5 100644 (file)
 # Conditional build options (--with name/--without name):
 #
 #   dbus     - Enable/disable DBUS support (default = enable)
-#   php      - Enable/disable PHP support (default = enable)
 
 %{!?_with_dbus: %{!?_without_dbus: %define _with_dbus --with-dbus}}
 %{?_with_dbus: %define _dbus --enable-dbus}
 %{!?_with_dbus: %define _dbus --disable-dbus}
 
-%{!?_with_php: %{!?_without_php: %define _with_php --with-php}}
-%{?_with_php: %define _php --with-php}
-%{!?_with_php: %define _php --without-php}
-
 %{!?_with_static: %{!?_without_static: %define _without_static --without-static}}
 %{?_with_static: %define _static --enable-static}
 %{!?_with_static: %define _static --disable-static}
@@ -70,13 +65,6 @@ Summary: CUPS - LPD support
 Group: System Environment/Daemons
 Requires: %{name} = %{epoch}:%{version} xinetd
 
-%if %{?_with_php:1}%{!?_with_php:0}
-%package php
-Summary: CUPS - PHP support
-Group: Development/Languages
-Requires: %{name}-libs = %{epoch}:%{version}
-%endif
-
 %description
 CUPS is the standards-based, open source printing system developed by
 Apple Inc. for Mac OS® X and other UNIX®-like operating systems.
@@ -90,17 +78,12 @@ This package provides the CUPS shared libraries.
 %description lpd
 This package provides LPD client support.
 
-%if %{?_with_php:1}%{!?_with_php:0}
-%description php
-This package provides PHP support for CUPS.
-%endif
-
 %prep
 %setup
 
 %build
 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_OPT_FLAGS" \
-    ./configure %{_dbus} %{_php} %{_static}
+    ./configure %{_dbus} %{_static}
 # If we got this far, all prerequisite libraries must be here.
 make
 
@@ -362,12 +345,6 @@ rm -rf $RPM_BUILD_ROOT
 %dir /usr/share/man/man8
 /usr/share/man/man8/cups-lpd.8.gz
 
-%if %{?_with_php:1}%{!?_with_php:0}
-%files php
-# PHP
-/usr/lib*/php*
-%endif
-
 
 #
 # End of "$Id$".
diff --git a/scripting/perl/CUPS.pm b/scripting/perl/CUPS.pm
deleted file mode 100644 (file)
index 5f2ed5f..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-package CUPS;
-
-use 5.006;
-use strict;
-use warnings;
-use Carp;
-
-require Exporter;
-require DynaLoader;
-use AutoLoader;
-
-our @ISA = qw(Exporter DynaLoader);
-
-# Items to export into callers namespace by default. Note: do not export
-# names by default without a very good reason. Use EXPORT_OK instead.
-# Do not simply export all your public functions/methods/constants.
-
-# This allows declaration      use CUPS ':all';
-# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
-# will save memory.
-our %EXPORT_TAGS = ( 'all' => [ qw(
-       CUPS_DATE_ANY
-       CUPS_VERSION
-       HTTP_MAX_BUFFER
-       HTTP_MAX_HOST
-       HTTP_MAX_URI
-       HTTP_MAX_VALUE
-       IPP_MAX_NAME
-       IPP_MAX_VALUES
-       IPP_PORT
-       PPD_MAX_LINE
-       PPD_MAX_NAME
-       PPD_MAX_TEXT
-       PPD_VERSION
-) ] );
-
-our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
-
-our @EXPORT = qw(
-       CUPS_DATE_ANY
-       CUPS_VERSION
-       HTTP_MAX_BUFFER
-       HTTP_MAX_HOST
-       HTTP_MAX_URI
-       HTTP_MAX_VALUE
-       IPP_MAX_NAME
-       IPP_MAX_VALUES
-       IPP_PORT
-       PPD_MAX_LINE
-       PPD_MAX_NAME
-       PPD_MAX_TEXT
-       PPD_VERSION
-);
-our $VERSION = '1.2';
-
-sub AUTOLOAD {
-    # This AUTOLOAD is used to 'autoload' constants from the constant()
-    # XS function.  If a constant is not found then control is passed
-    # to the AUTOLOAD in AutoLoader.
-
-    my $constname;
-    our $AUTOLOAD;
-    ($constname = $AUTOLOAD) =~ s/.*:://;
-    croak "& not defined" if $constname eq 'constant';
-    my $val = constant($constname, @_ ? $_[0] : 0);
-    if ($! != 0) {
-       if ($! =~ /Invalid/ || $!{EINVAL}) {
-           $AutoLoader::AUTOLOAD = $AUTOLOAD;
-           goto &AutoLoader::AUTOLOAD;
-       }
-       else {
-           croak "Your vendor has not defined CUPS macro $constname";
-       }
-    }
-    {
-       no strict 'refs';
-       # Fixed between 5.005_53 and 5.005_61
-       if ($] >= 5.00561) {
-           *$AUTOLOAD = sub () { $val };
-       }
-       else {
-           *$AUTOLOAD = sub { $val };
-       }
-    }
-    goto &$AUTOLOAD;
-}
-
-bootstrap CUPS $VERSION;
-
-# Preloaded methods go here.
-
-# Autoload methods go after =cut, and are processed by the autosplit program.
-
-1;
-__END__
-# Below is stub documentation for your module. You better edit it!
-
-=head1 NAME
-
-CUPS - Perl extension for blah blah blah
-
-=head1 SYNOPSIS
-
-  use CUPS;
-  blah blah blah
-
-=head1 DESCRIPTION
-
-Stub documentation for CUPS, created by h2xs. It looks like the
-author of the extension was negligent enough to leave the stub
-unedited.
-
-Blah blah blah.
-
-=head2 EXPORT
-
-None by default.
-
-=head2 Exportable constants
-
-  CUPS_DATE_ANY
-  CUPS_VERSION
-  HTTP_MAX_BUFFER
-  HTTP_MAX_HOST
-  HTTP_MAX_URI
-  HTTP_MAX_VALUE
-  IPP_MAX_NAME
-  IPP_MAX_VALUES
-  IPP_PORT
-  PPD_MAX_LINE
-  PPD_MAX_NAME
-  PPD_MAX_TEXT
-  PPD_VERSION
-
-
-=head1 AUTHOR
-
-A. U. Thor, E<lt>a.u.thor@a.galaxy.far.far.awayE<gt>
-
-=head1 SEE ALSO
-
-L<perl>.
-
-=cut
diff --git a/scripting/perl/CUPS.xs b/scripting/perl/CUPS.xs
deleted file mode 100644 (file)
index efaf6dc..0000000
+++ /dev/null
@@ -1,270 +0,0 @@
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-
-#include <cups/cups.h>
-#include <cups/http.h>
-#include <cups/ipp.h>
-#include <cups/language.h>
-#include <cups/ppd.h>
-
-static int
-not_here(char *s)
-{
-    croak("%s not implemented on this architecture", s);
-    return -1;
-}
-
-static double
-constant_PPD_M(char *name, int len, int arg)
-{
-    if (5 + 3 >= len ) {
-       errno = EINVAL;
-       return 0;
-    }
-    switch (name[5 + 3]) {
-    case 'L':
-       if (strEQ(name + 5, "AX_LINE")) {       /* PPD_M removed */
-#ifdef PPD_MAX_LINE
-           return PPD_MAX_LINE;
-#else
-           goto not_there;
-#endif
-       }
-    case 'N':
-       if (strEQ(name + 5, "AX_NAME")) {       /* PPD_M removed */
-#ifdef PPD_MAX_NAME
-           return PPD_MAX_NAME;
-#else
-           goto not_there;
-#endif
-       }
-    case 'T':
-       if (strEQ(name + 5, "AX_TEXT")) {       /* PPD_M removed */
-#ifdef PPD_MAX_TEXT
-           return PPD_MAX_TEXT;
-#else
-           goto not_there;
-#endif
-       }
-    }
-    errno = EINVAL;
-    return 0;
-
-not_there:
-    errno = ENOENT;
-    return 0;
-}
-
-static double
-constant_P(char *name, int len, int arg)
-{
-    if (1 + 3 >= len ) {
-       errno = EINVAL;
-       return 0;
-    }
-    switch (name[1 + 3]) {
-    case 'M':
-       if (!strnEQ(name + 1,"PD_", 3))
-           break;
-       return constant_PPD_M(name, len, arg);
-    case 'V':
-       if (strEQ(name + 1, "PD_VERSION")) {    /* P removed */
-#ifdef PPD_VERSION
-           return PPD_VERSION;
-#else
-           goto not_there;
-#endif
-       }
-    }
-    errno = EINVAL;
-    return 0;
-
-not_there:
-    errno = ENOENT;
-    return 0;
-}
-
-static double
-constant_H(char *name, int len, int arg)
-{
-    if (1 + 8 >= len ) {
-       errno = EINVAL;
-       return 0;
-    }
-    switch (name[1 + 8]) {
-    case 'B':
-       if (strEQ(name + 1, "TTP_MAX_BUFFER")) {        /* H removed */
-#ifdef HTTP_MAX_BUFFER
-           return HTTP_MAX_BUFFER;
-#else
-           goto not_there;
-#endif
-       }
-    case 'H':
-       if (strEQ(name + 1, "TTP_MAX_HOST")) {  /* H removed */
-#ifdef HTTP_MAX_HOST
-           return HTTP_MAX_HOST;
-#else
-           goto not_there;
-#endif
-       }
-    case 'U':
-       if (strEQ(name + 1, "TTP_MAX_URI")) {   /* H removed */
-#ifdef HTTP_MAX_URI
-           return HTTP_MAX_URI;
-#else
-           goto not_there;
-#endif
-       }
-    case 'V':
-       if (strEQ(name + 1, "TTP_MAX_VALUE")) { /* H removed */
-#ifdef HTTP_MAX_VALUE
-           return HTTP_MAX_VALUE;
-#else
-           goto not_there;
-#endif
-       }
-    }
-    errno = EINVAL;
-    return 0;
-
-not_there:
-    errno = ENOENT;
-    return 0;
-}
-
-static double
-constant_IPP_M(char *name, int len, int arg)
-{
-    if (5 + 3 >= len ) {
-       errno = EINVAL;
-       return 0;
-    }
-    switch (name[5 + 3]) {
-    case 'N':
-       if (strEQ(name + 5, "AX_NAME")) {       /* IPP_M removed */
-#ifdef IPP_MAX_NAME
-           return IPP_MAX_NAME;
-#else
-           goto not_there;
-#endif
-       }
-    case 'V':
-       if (strEQ(name + 5, "AX_VALUES")) {     /* IPP_M removed */
-#ifdef IPP_MAX_VALUES
-           return IPP_MAX_VALUES;
-#else
-           goto not_there;
-#endif
-       }
-    }
-    errno = EINVAL;
-    return 0;
-
-not_there:
-    errno = ENOENT;
-    return 0;
-}
-
-static double
-constant_I(char *name, int len, int arg)
-{
-    if (1 + 3 >= len ) {
-       errno = EINVAL;
-       return 0;
-    }
-    switch (name[1 + 3]) {
-    case 'M':
-       if (!strnEQ(name + 1,"PP_", 3))
-           break;
-       return constant_IPP_M(name, len, arg);
-    case 'P':
-       if (strEQ(name + 1, "PP_PORT")) {       /* I removed */
-#ifdef IPP_PORT
-           return IPP_PORT;
-#else
-           goto not_there;
-#endif
-       }
-    }
-    errno = EINVAL;
-    return 0;
-
-not_there:
-    errno = ENOENT;
-    return 0;
-}
-
-static double
-constant_C(char *name, int len, int arg)
-{
-    if (1 + 4 >= len ) {
-       errno = EINVAL;
-       return 0;
-    }
-    switch (name[1 + 4]) {
-    case 'D':
-       if (strEQ(name + 1, "UPS_DATE_ANY")) {  /* C removed */
-#ifdef CUPS_DATE_ANY
-           return CUPS_DATE_ANY;
-#else
-           goto not_there;
-#endif
-       }
-    case 'V':
-       if (strEQ(name + 1, "UPS_VERSION")) {   /* C removed */
-#ifdef CUPS_VERSION
-           return CUPS_VERSION;
-#else
-           goto not_there;
-#endif
-       }
-    }
-    errno = EINVAL;
-    return 0;
-
-not_there:
-    errno = ENOENT;
-    return 0;
-}
-
-static double
-constant(char *name, int len, int arg)
-{
-    errno = 0;
-    switch (name[0 + 0]) {
-    case 'C':
-       return constant_C(name, len, arg);
-    case 'H':
-       return constant_H(name, len, arg);
-    case 'I':
-       return constant_I(name, len, arg);
-    case 'P':
-       return constant_P(name, len, arg);
-    }
-    errno = EINVAL;
-    return 0;
-
-not_there:
-    errno = ENOENT;
-    return 0;
-}
-
-
-MODULE = CUPS          PACKAGE = CUPS          
-
-
-double
-constant(sv,arg)
-    PREINIT:
-       STRLEN          len;
-    INPUT:
-       SV *            sv
-       char *          s = SvPV(sv, len);
-       int             arg
-    CODE:
-       RETVAL = constant(s,len,arg);
-    OUTPUT:
-       RETVAL
-
diff --git a/scripting/perl/Makefile.PL b/scripting/perl/Makefile.PL
deleted file mode 100644 (file)
index f5e4bdd..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
-WriteMakefile(
-    'NAME'             => 'CUPS',
-    'VERSION_FROM'     => 'CUPS.pm', # finds $VERSION
-    'PREREQ_PM'                => {}, # e.g., Module::Name => 1.1
-    ($] >= 5.005 ?    ## Add these new keywords supported since 5.005
-      (ABSTRACT_FROM => 'CUPS.pm', # retrieve abstract from module
-       AUTHOR     => 'A. U. Thor <a.u.thor@a.galaxy.far.far.away>') : ()),
-    'LIBS'             => ['-lcups '], # e.g., '-lm'
-    'DEFINE'           => '', # e.g., '-DHAVE_SOMETHING'
-       # Insert -I. if you add *.h files later:
-    'INC'              => '', # e.g., '-I/usr/include/other'
-       # Un-comment this if you add C files to link with later:
-    # 'OBJECT'         => '$(O_FILES)', # link all the C files too
-);
diff --git a/scripting/perl/README b/scripting/perl/README
deleted file mode 100644 (file)
index 1605c77..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-CUPS version 1.2
-================
-
-The README is used to introduce the module and provide instructions on
-how to install the module, any machine dependencies it may have (for
-example C compilers and installed libraries) and any other information
-that should be provided before the module is installed.
-
-A README file is required for CPAN modules since CPAN extracts the
-README file from a module distribution so that people browsing the
-archive can use it get an idea of the modules uses. It is usually a
-good idea to provide version information here so that people can
-decide whether fixes for the module are worth downloading.
-
-INSTALLATION
-
-To install this module type the following:
-
-   perl Makefile.PL
-   make
-   make test
-   make install
-
-DEPENDENCIES
-
-This module requires these other modules and libraries:
-
-  blah blah blah
-
-COPYRIGHT AND LICENCE
-
-Put the correct copyright and licence information here.
-
-Copyright (C) 2002 A. U. Thor blah blah blah
-
diff --git a/scripting/perl/test.pl b/scripting/perl/test.pl
deleted file mode 100644 (file)
index acf3191..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl test.pl'
-
-#########################
-
-# change 'tests => 1' to 'tests => last_test_to_print';
-
-use Test;
-BEGIN { plan tests => 1 };
-use CUPS;
-ok(1); # If we made it this far, we're ok.
-
-#########################
-
-# Insert your test code below, the Test module is use()ed here so read
-# its man page ( perldoc Test ) for help writing this test script.
-
diff --git a/scripting/php/Dependencies b/scripting/php/Dependencies
deleted file mode 100644 (file)
index d3c60c7..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-phpcups.o: ../../cups/string-private.h ../../config.h phpcups.h
-phpcups.o: ../../cups/cups.h ../../cups/file.h ../../cups/versioning.h
-phpcups.o: ../../cups/ipp.h ../../cups/http.h ../../cups/array.h
-phpcups.o: ../../cups/language.h ../../cups/language.h
-phpcups.o: ../../cups/debug-private.h
diff --git a/scripting/php/Makefile b/scripting/php/Makefile
deleted file mode 100644 (file)
index a10f4f4..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-#
-# "$Id: Makefile 3572 2003-04-08 19:56:25Z mike $"
-#
-#   PHP Makefile for CUPS.
-#
-#   Copyright 2007-2011 by Apple Inc.
-#   Copyright 1997-2007 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 "LICENSE.txt"
-#   which should have been included with this file.  If this file is
-#   file is missing or damaged, see the license at "http://www.cups.org/".
-#
-
-include ../../Makedefs
-
-
-#
-# Where to install and how to compile the PHP module...
-#
-
-PHPDIR =       $(BUILDROOT)`$(PHPCONFIG) --extension-dir`
-OPTIONS        =       $(PHPOPTIONS)
-
-
-#
-# Object files...
-#
-
-OBJS   =       phpcups.o
-
-
-#
-# Targets in this directory...
-#
-
-PHPCUPS        =       phpcups.so
-
-
-#
-# Make all targets...
-#
-
-all:   $(PHPCUPS)
-
-
-#
-# Make library targets...
-#
-
-libs:
-
-
-#
-# Make unit tests...
-#
-
-unittests:
-
-
-#
-# Remove object and target files...
-#
-
-clean:
-       $(RM) $(OBJS) $(PHPCUPS)
-
-
-#
-# Update dependencies (without system header dependencies...)
-#
-
-depend:
-       makedepend -Y -I../.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
-
-
-#
-# Install all targets...
-#
-
-install:       all install-data install-headers install-libs install-exec
-
-
-#
-# Install data files...
-#
-
-install-data:
-
-
-#
-# Install programs...
-#
-
-install-exec:
-       echo Installing $(PHPCUPS) in $(PHPDIR)
-       $(INSTALL_DIR) $(PHPDIR)
-       $(INSTALL_LIB) $(PHPCUPS) $(PHPDIR)
-       if test "x$(SYMROOT)" != x; then \
-               $(INSTALL_DIR) $(SYMROOT); \
-               cp $(PHPCUPS) $(SYMROOT); \
-       fi
-
-
-#
-# Install headers...
-#
-
-install-headers:
-
-
-#
-# Install libraries...
-#
-
-install-libs:
-
-
-#
-# Uninstall object and target files...
-#
-
-uninstall:
-       $(RM) $(PHPDIR)/$(PHPCUPS)
-       -$(RMDIR) $(PHPDIR)
-
-
-#
-# phpcups.so
-#
-
-phpcups.so:    $(OBJS) ../../Makedefs
-       echo Linking $@...
-       if test `uname` = Darwin; then \
-               DSOFLAGS="-bundle -flat_namespace -undefined suppress $(RC_CFLAGS)"; \
-       else \
-               DSOFLAGS="$(DSOFLAGS)"; \
-       fi; \
-       echo $(DSO) $$DSOFLAGS $(ARCHFLAGS) -o $@ $(OBJS) -L../../cups $(LIBS); \
-       $(DSO) $$DSOFLAGS $(ARCHFLAGS) -o $@ $(OBJS) -L../../cups $(LIBS)
-
-
-#
-# Dependencies...
-#
-
-include Dependencies
-
-
-#
-# End of "$Id: Makefile 3572 2003-04-08 19:56:25Z mike $".
-#
diff --git a/scripting/php/README b/scripting/php/README
deleted file mode 100644 (file)
index e4ab27d..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-README - 02/25/2006
--------------------
-
-INTRODUCTION
-
-    This directory contains a dynamically loadable CUPS extension
-    module for PHP 4 and 5.  The CUPS 1.2 module has been
-    substantially updated to provide an API more consistent with
-    the C API and is NOT compatible with the CUPS 1.1 module.
-
-
-COMPILING AND INSTALLING
-
-    Run "make" to compile the PHP CUPS extension:
-
-       make
-
-    To install it, type:
-
-       make install
-
-
-RESOURCES AND SUPPORT
-
-    Questions should be reported to the CUPS newsgroups/mailing
-    lists at:
-
-       http://www.cups.org/newsgroups.php
-
-    Bug reports and enhancement requests can be submitted via the
-    form at:
-
-       http://www.cups.org/str.php
-
-
-QUICK REFERENCE DOCUMENTATION
-
-    In lieu of actual documentation, the following definitions
-    can be used as a quick reference to the supported functions:
-
-
-    CUPS_CANCEL_JOB
-
-    Cancels a job on the named destination:
-
-        bool cups_cancel_job(string dest, int id)
-
-    The return value is TRUE on success and FALSE on failure.
-
-    Example:
-
-        if (!cups_cancel_job("myprinter", 123))
-         print("Unable to cancel job: " . cups_last_error_string() . "\n");
-
-
-    CUPS_GET_DESTS
-
-    Gets a list of available destinations:
-
-        array cups_get_dests()
-
-    The return value is an array of objects with the following
-    properties:
-
-        name        The name of the printer or class
-       instance    The instance of the printer or class
-       is_default  TRUE if the printer or class is the default destination
-       options     Associative array of options and their values
-
-    Example:
-
-        $dest = cups_get_dests();
-
-
-    CUPS_GET_JOBS
-
-    Gets a list of jobs:
-
-        array cups_get_jobs(string dest, bool myjobs, int completed)
-
-    The "dest" string can be blank for jobs on all destinations.
-    Pass TRUE for "myjobs" to only get jobs for the current user.
-    The "completed" argument can be 0 for pending jobs, 1 for
-    completed jobs, and -1 for all jobs.
-
-    The return value is an array of objects with the following
-    properties:
-
-        id                The job ID
-        dest              Printer or class name
-        title             Title/job name
-        user              User the submitted the job
-        format            Document format
-        state             Job state
-        size              Size in kilobytes
-        priority          Priority (1-100)
-        completed_time    Time the job was completed
-        creation_time     Time the job was created
-        processing_time   Time the job was processed
-
-    Example:
-
-        $jobs = cups_get_jobs("", FALSE, -1);
-
-
-    CUPS_LAST_ERROR
-    
-    Returns the IPP status code for the most recent request:
-
-        int cups_last_error()
-
-    Example:
-
-        $error = cups_last_error();
-
-
-    CUPS_LAST_ERROR_STRING
-    
-    Returns the IPP status-message string for the most recent request:
-
-        string cups_last_error_string()
-
-    Example:
-
-        $message = cups_last_error_string();
-
-
-    CUPS_PRINT_FILE
-
-    Prints a single file to a printer or class:
-
-        int cups_print_file(string dest, string filename, string title,
-                           array options)
-
-    The return value is the job ID or 0 if there was an error.
-
-    Example:
-
-        $options = array("name" => "value", "name2" => "value2");
-       $id      = cups_print_file("dest", "filename", "title", $options);
-
-
-    CUPS_PRINT_FILES
-
-    Prints one or more files to a printer or class:
-
-        int cups_print_files(string dest, array files, string title,
-                            array options);
-
-    The return value is the job ID or 0 if there was an error.
-
-    Example:
-
-        $files   = array("file1", "file2", "file3");
-        $options = array("name" => "value", "name2" => "value2");
-       $id      = cups_print_file("dest", $files, "title", $options);
-
diff --git a/scripting/php/phpcups.c b/scripting/php/phpcups.c
deleted file mode 100644 (file)
index 563bd63..0000000
+++ /dev/null
@@ -1,487 +0,0 @@
-/*
- * "$Id$"
- *
- *   Printing utilities for CUPS.
- *
- *   Copyright 2007-2011 by Apple Inc.
- *   Copyright 1997-2007 by Easy Software Products.
- *
- *   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 "LICENSE.txt"
- *   which should have been included with this file.  If this file is
- *   file is missing or damaged, see the license at "http://www.cups.org/".
- *
- * Contents:
- *
- *   cups_convert_options()        - Convert a PHP options array to a CUPS options array.
- *   zm_startup_phpcups()          - Initialize the CUPS module.
- *   zif_cups_cancel_job()         - Cancel a job.
- *   zif_cups_get_dests()          - Get a list of printers and classes.
- *   zif_cups_get_jobs()           - Get a list of jobs.
- *   zif_cups_last_error()         - Return the last IPP status code.
- *   zif_cups_last_error_string()  - Return the last IPP status
- *   zif_cups_print_file()         - Print a single file.
- *   zif_cups_print_files()        - Print multiple files.
- */
-
-/*
- * Include necessary headers...
- */
-
-#include <cups/string-private.h>
-#include "php.h"
-#include "php_ini.h"
-#include "ext/standard/info.h"
-#include "phpcups.h"
-
-
-/*
- * PHP function list...
- */
-
-function_entry phpcups_functions[] =
-{
-  PHP_FE(cups_cancel_job, NULL)
-  PHP_FE(cups_get_dests, NULL)
-  PHP_FE(cups_get_jobs, NULL)
-  PHP_FE(cups_last_error, NULL)
-  PHP_FE(cups_last_error_string, NULL)
-  PHP_FE(cups_print_file, NULL)
-  PHP_FE(cups_print_files, NULL)
-  {NULL, NULL, NULL}
-};
-
-
-/*
- * PHP module info...
- */
-
-zend_module_entry phpcups_module_entry =
-{
-  STANDARD_MODULE_HEADER,
-  "phpcups",
-  phpcups_functions,
-  PHP_MINIT(phpcups),
-  NULL,
-  NULL,
-  NULL,
-  NULL,
-  CUPS_SVERSION,
-  STANDARD_MODULE_PROPERTIES
-};
-
-
-ZEND_GET_MODULE(phpcups)
-
-
-/*
- * 'cups_convert_options()' - Convert a PHP options array to a CUPS options array.
- */
-
-static int                             /* O - Number of options */
-cups_convert_options(
-    zval          *optionsobj,         /* I - Options array object */
-    cups_option_t **options)           /* O - Options */
-{
-  int          num_options;            /* Number of options */
-  HashTable    *ht;                    /* Option array hash table */
-  Bucket       *current;               /* Current element in array */
-  zval         *value;                 /* Current value in array */
-  char         temp[255];              /* String value for numbers */
-
-
-  ht          = Z_ARRVAL_P(optionsobj);
-  num_options = 0;
-
-  for (current = ht->pListHead; current; current = current->pListNext)
-  {
-    value = (zval *)current->pDataPtr;
-
-    switch (Z_TYPE_P(value))
-    {
-      case IS_LONG :
-          sprintf(temp, "%ld", Z_LVAL_P(value));
-          num_options = cupsAddOption(current->arKey, temp, num_options,
-                                     options);
-          break;
-
-      case IS_DOUBLE :
-          sprintf(temp, "%g", Z_DVAL_P(value));
-          num_options = cupsAddOption(current->arKey, temp, num_options,
-                                     options);
-          break;
-
-      case IS_BOOL :
-          num_options = cupsAddOption(current->arKey,
-                                     Z_BVAL_P(value) ? "true" : "false",
-                                     num_options, options);
-          break;
-
-      case IS_STRING :
-          num_options = cupsAddOption(current->arKey, Z_STRVAL_P(value),
-                                     num_options, options);
-          break;
-    }
-  }
-
-  return (num_options);
-}
-
-
-/*
- * 'zm_startup_phpcups()' - Initialize the CUPS module.
- */
-
-PHP_MINIT_FUNCTION(phpcups)
-{
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_LOCAL", CUPS_PRINTER_LOCAL, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_CLASS", CUPS_PRINTER_CLASS, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_REMOTE", CUPS_PRINTER_REMOTE, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_BW", CUPS_PRINTER_BW, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_COLOR", CUPS_PRINTER_COLOR, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_DUPLEX", CUPS_PRINTER_DUPLEX, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_STAPLE", CUPS_PRINTER_STAPLE, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_COPIES", CUPS_PRINTER_COPIES, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_COLLATE", CUPS_PRINTER_COLLATE, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_PUNCH", CUPS_PRINTER_PUNCH, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_COVER", CUPS_PRINTER_COVER, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_BIND", CUPS_PRINTER_BIND, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_SORT", CUPS_PRINTER_SORT, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_SMALL", CUPS_PRINTER_SMALL, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_MEDIUM", CUPS_PRINTER_MEDIUM, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_LARGE", CUPS_PRINTER_LARGE, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_VARIABLE", CUPS_PRINTER_VARIABLE, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_IMPLICIT", CUPS_PRINTER_IMPLICIT, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_DEFAULT", CUPS_PRINTER_DEFAULT, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_FAX", CUPS_PRINTER_FAX, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_REJECTING", CUPS_PRINTER_REJECTING, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_DELETE", CUPS_PRINTER_DELETE, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_NOT_SHARED", CUPS_PRINTER_NOT_SHARED, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_AUTHENTICATED", CUPS_PRINTER_AUTHENTICATED, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_COMMANDS", CUPS_PRINTER_COMMANDS, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_DISCOVERED", CUPS_PRINTER_DISCOVERED, CONST_CS);
-  REGISTER_LONG_CONSTANT("CUPS_PRINTER_OPTIONS", CUPS_PRINTER_OPTIONS, CONST_CS);
-
-  REGISTER_LONG_CONSTANT("IPP_OK", IPP_OK, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_OK_SUBST", IPP_OK_SUBST, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_OK_CONFLICT", IPP_OK_CONFLICT, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_OK_IGNORED_SUBSCRIPTIONS", IPP_OK_IGNORED_SUBSCRIPTIONS, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_OK_IGNORED_NOTIFICATIONS", IPP_OK_IGNORED_NOTIFICATIONS, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_OK_TOO_MANY_EVENTS", IPP_OK_TOO_MANY_EVENTS, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_OK_BUT_CANCEL_SUBSCRIPTION", IPP_OK_BUT_CANCEL_SUBSCRIPTION, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_OK_EVENTS_COMPLETE", IPP_OK_EVENTS_COMPLETE, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_REDIRECTION_OTHER_SITE", IPP_REDIRECTION_OTHER_SITE, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_BAD_REQUEST", IPP_BAD_REQUEST, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_FORBIDDEN", IPP_FORBIDDEN, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_NOT_AUTHENTICATED", IPP_NOT_AUTHENTICATED, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_NOT_AUTHORIZED", IPP_NOT_AUTHORIZED, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_NOT_POSSIBLE", IPP_NOT_POSSIBLE, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_TIMEOUT", IPP_TIMEOUT, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_NOT_FOUND", IPP_NOT_FOUND, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_GONE", IPP_GONE, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_REQUEST_ENTITY", IPP_REQUEST_ENTITY, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_REQUEST_VALUE", IPP_REQUEST_VALUE, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_DOCUMENT_FORMAT", IPP_DOCUMENT_FORMAT, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_ATTRIBUTES", IPP_ATTRIBUTES, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_URI_SCHEME", IPP_URI_SCHEME, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_CHARSET", IPP_CHARSET, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_CONFLICT", IPP_CONFLICT, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_COMPRESSION_NOT_SUPPORTED", IPP_COMPRESSION_NOT_SUPPORTED, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_COMPRESSION_ERROR", IPP_COMPRESSION_ERROR, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_DOCUMENT_FORMAT_ERROR", IPP_DOCUMENT_FORMAT_ERROR, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_DOCUMENT_ACCESS_ERROR", IPP_DOCUMENT_ACCESS_ERROR, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_ATTRIBUTES_NOT_SETTABLE", IPP_ATTRIBUTES_NOT_SETTABLE, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_IGNORED_ALL_SUBSCRIPTIONS", IPP_IGNORED_ALL_SUBSCRIPTIONS, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_TOO_MANY_SUBSCRIPTIONS", IPP_TOO_MANY_SUBSCRIPTIONS, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_IGNORED_ALL_NOTIFICATIONS", IPP_IGNORED_ALL_NOTIFICATIONS, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_PRINT_SUPPORT_FILE_NOT_FOUND", IPP_PRINT_SUPPORT_FILE_NOT_FOUND, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_INTERNAL_ERROR", IPP_INTERNAL_ERROR, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_OPERATION_NOT_SUPPORTED", IPP_OPERATION_NOT_SUPPORTED, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_SERVICE_UNAVAILABLE", IPP_SERVICE_UNAVAILABLE, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_VERSION_NOT_SUPPORTED", IPP_VERSION_NOT_SUPPORTED, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_DEVICE_ERROR", IPP_DEVICE_ERROR, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_TEMPORARY_ERROR", IPP_TEMPORARY_ERROR, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_NOT_ACCEPTING", IPP_NOT_ACCEPTING, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_PRINTER_BUSY", IPP_PRINTER_BUSY, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_ERROR_JOB_CANCELLED", IPP_ERROR_JOB_CANCELLED, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_MULTIPLE_JOBS_NOT_SUPPORTED", IPP_MULTIPLE_JOBS_NOT_SUPPORTED, CONST_CS);
-  REGISTER_LONG_CONSTANT("IPP_PRINTER_IS_DEACTIVATED", IPP_PRINTER_IS_DEACTIVATED, CONST_CS);
-
-  return (SUCCESS);
-}
-
-/*
- * 'zif_cups_cancel_job()' - Cancel a job.
- */
-
-PHP_FUNCTION(cups_cancel_job)
-{
-  char *dest;                          /* Destination */
-  int  dest_len,                       /* Length of destination */
-       id;                             /* Job ID */
-
-
-  if (ZEND_NUM_ARGS() != 2 ||
-      zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &dest, &dest_len, &id))
-  {
-    WRONG_PARAM_COUNT;
-  }
-
-  RETURN_LONG(cupsCancelJob(dest, id));
-}
-
-
-/*
- * 'zif_cups_get_dests()' - Get a list of printers and classes.
- */
-
-PHP_FUNCTION(cups_get_dests)
-{
-  int          i, j,                   /* Looping vars */
-               num_dests;              /* Number of destinations */
-  cups_dest_t  *dests,                 /* Destinations */
-               *dest;                  /* Current destination */
-  cups_option_t        *option;                /* Current option */
-  zval         *destobj,               /* Destination object */
-               *optionsobj;            /* Options object */
-
-
-  if (ZEND_NUM_ARGS() != 0)
-  {
-    WRONG_PARAM_COUNT;
-  }
-
-  if ((num_dests = cupsGetDests(&dests)) <= 0)
-  {
-    RETURN_NULL();
-  }
-
-  if (array_init(return_value) == SUCCESS)
-  {
-    for (i = 0, dest = dests; i < num_dests; i ++, dest ++)
-    {
-      MAKE_STD_ZVAL(destobj);
-
-      if (object_init(destobj) == SUCCESS)
-      {
-       /*
-        * Add properties to the destination for each of the cups_dest_t
-       * members...
-       */
-
-        add_property_string(destobj, "name", dest->name, 1);
-        add_property_string(destobj, "instance",
-                           dest->instance ? dest->instance : "", 1);
-        add_property_long(destobj, "is_default", dest->is_default);
-
-       /*
-        * Create an associative array for the options...
-       */
-
-        MAKE_STD_ZVAL(optionsobj);
-
-       if (array_init(optionsobj) == SUCCESS)
-       {
-         for (j = 0, option = dest->options;
-              j < dest->num_options;
-              j ++, option ++)
-           add_assoc_string(optionsobj, option->name, option->value, 1);
-
-         add_property_zval(destobj, "options", optionsobj);
-       }
-
-        add_index_zval(return_value, i, destobj);
-      }
-    }
-  }
-
-  cupsFreeDests(num_dests, dests);
-}
-
-
-/*
- * 'zif_cups_get_jobs()' - Get a list of jobs.
- */
-
-PHP_FUNCTION(cups_get_jobs)
-{
-  char         *dest;                  /* Destination */
-  int          dest_len,               /* Length of destination */
-               myjobs,                 /* Only show my jobs? */
-               completed;              /* Show completed jobs? */
-  int          i,                      /* Looping var */
-               num_jobs;               /* Number of jobs */
-  cups_job_t   *jobs,                  /* Jobs */
-               *job;                   /* Current job */
-  zval         *jobobj;                /* Job object */
-
-
-
-
-  if (ZEND_NUM_ARGS() != 3 ||
-      zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sll", &dest, &dest_len, &myjobs, &completed))
-  {
-    WRONG_PARAM_COUNT;
-  }
-
-  if (!*dest)
-    dest = NULL;
-
-  if ((num_jobs = cupsGetJobs(&jobs, dest, myjobs, completed)) <= 0)
-  {
-    RETURN_NULL();
-  }
-
-  if (array_init(return_value) == SUCCESS)
-  {
-    for (i = 0, job = jobs; i < num_jobs; i ++, job ++)
-    {
-      MAKE_STD_ZVAL(jobobj);
-
-      if (object_init(jobobj) == SUCCESS)
-      {
-       /*
-        * Add properties to the job for each of the cups_job_t
-       * members...
-       */
-
-        add_property_long(jobobj, "id", job->id);
-        add_property_string(jobobj, "dest", job->dest, 1);
-        add_property_string(jobobj, "title", job->title, 1);
-        add_property_string(jobobj, "user", job->user, 1);
-        add_property_string(jobobj, "format", job->format, 1);
-        add_property_long(jobobj, "state", job->state);
-        add_property_long(jobobj, "size", job->size);
-        add_property_long(jobobj, "priority", job->priority);
-        add_property_long(jobobj, "completed_time", job->completed_time);
-        add_property_long(jobobj, "creation_time", job->creation_time);
-        add_property_long(jobobj, "processing_time", job->processing_time);
-
-        add_index_zval(return_value, i, jobobj);
-      }
-    }
-  }
-
-  cupsFreeJobs(num_jobs, jobs);
-}
-
-
-/*
- * 'zif_cups_last_error()' - Return the last IPP status code.
- */
-
-PHP_FUNCTION(cups_last_error)
-{
-  if (ZEND_NUM_ARGS() != 0)
-  {
-    WRONG_PARAM_COUNT;
-  }
-
-  RETURN_LONG(cupsLastError());
-}
-
-
-/*
- * 'zif_cups_last_error_string()' - Return the last IPP status-message.
- */
-
-PHP_FUNCTION(cups_last_error_string)
-{
-  if (ZEND_NUM_ARGS() != 0)
-  {
-    WRONG_PARAM_COUNT;
-  }
-
-  RETURN_STRING((char *)cupsLastErrorString(), 1);
-}
-
-
-/*
- * 'zif_cups_print_file()' - Print a single file.
- */
-
-PHP_FUNCTION(cups_print_file)
-{
-  char         *dest;                  /* Destination */
-  int          dest_len;               /* Length of destination */
-  char         *filename;              /* Filename */
-  int          filename_len;           /* Length of filename */
-  char         *title;                 /* Title */
-  int          title_len;              /* Length of title */
-  zval         *optionsobj;            /* Array of options */
-  int          num_options;            /* Number of options */
-  cups_option_t        *options;               /* Options */
-  int          id;                     /* Job ID */
-
-
-  if (ZEND_NUM_ARGS() != 4 ||
-      zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sssa", &dest, &dest_len,
-                            &filename, &filename_len,
-                           &title, &title_len, &optionsobj))
-  {
-    WRONG_PARAM_COUNT;
-  }
-
-  num_options = cups_convert_options(optionsobj, &options);
-
-  id = cupsPrintFile(dest, filename, title, num_options, options);
-
-  cupsFreeOptions(num_options, options);
-
-  RETURN_LONG(id);
-}
-
-
-/*
- * 'zif_cups_print_files()' - Print multiple files.
- */
-
-PHP_FUNCTION(cups_print_files)
-{
-  char         *dest;                  /* Destination */
-  int          dest_len;               /* Length of destination */
-  zval         *filesobj;              /* Files array */
-  int          num_files;              /* Number of files */
-  const char   *files[1000];           /* Files */
-  char         *title;                 /* Title */
-  int          title_len;              /* Length of title */
-  zval         *optionsobj;            /* Array of options */
-  int          num_options;            /* Number of options */
-  cups_option_t        *options;               /* Options */
-  HashTable    *ht2;                   /* Option array hash table */
-  Bucket       *current;               /* Current element in array */
-  int          id;                     /* Job ID */
-
-
-  if (ZEND_NUM_ARGS() != 4 ||
-      zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sasa", &dest, &dest_len, &filesobj,
-                           &title, &title_len, &optionsobj))
-  {
-    WRONG_PARAM_COUNT;
-  }
-
-  ht2       = Z_ARRVAL_P(filesobj);
-  num_files = 0;
-
-  for (current = ht2->pListHead; current; current = current->pListNext)
-  {
-    files[num_files ++] = Z_STRVAL_P(((zval *)current->pDataPtr));
-
-    if (num_files >= (int)(sizeof(files) / sizeof(files[0])))
-      break;
-  }
-
-  num_options = cups_convert_options(optionsobj, &options);
-
-  id = cupsPrintFiles(dest, num_files, files, title, num_options, options);
-
-  cupsFreeOptions(num_options, options);
-
-  RETURN_LONG(id);
-}
-
-
-/*
- * End of "$Id$".
- */
diff --git a/scripting/php/phpcups.h b/scripting/php/phpcups.h
deleted file mode 100644 (file)
index e4cefae..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * "$Id$"
- *
- *   PHP module include file for CUPS.
- *
- *   Copyright 2007-2011 by Apple Inc.
- *   Copyright 1997-2006 by Easy Software Products.
- *
- *   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 "LICENSE.txt"
- *   which should have been included with this file.  If this file is
- *   file is missing or damaged, see the license at "http://www.cups.org/".
- */
-
-#ifndef PHPCUPS_H
-#  define PHPCUPS_H
-
-/*
- * Include necessary headers...
- */
-
-#  include <cups/cups.h>
-#  include <cups/language.h>
-#  include <cups/debug-private.h>
-#  include <fcntl.h>
-#  include <sys/stat.h>
-#  if defined(WIN32) || defined(__EMX__)
-#    include <io.h>
-#  else
-#    include <unistd.h>
-#  endif /* WIN32 || __EMX__ */
-
-
-/*
- * Zend definitions...
- */
-
-extern zend_module_entry       phpcups_module_entry;
-#  define phpext_phpcups_ptr   &phpcups_module_entry
-
-#  ifdef PHP_WIN32
-#    define PHP_PHPCUPS_API    __declspec(dllexport)
-#  else
-#    define PHP_PHPCUPS_API
-#  endif
-
-#  ifdef ZTS
-#    include "TSRM.h"
-#  endif
-
-PHP_MINIT_FUNCTION(phpcups);
-
-PHP_FUNCTION(cups_cancel_job);
-PHP_FUNCTION(cups_get_dests);
-PHP_FUNCTION(cups_get_jobs);
-PHP_FUNCTION(cups_last_error);
-PHP_FUNCTION(cups_last_error_string);
-PHP_FUNCTION(cups_print_file);
-PHP_FUNCTION(cups_print_files);
-
-#endif /* !PHPCUPS_H */
-
-
-/*
- * End of "$Id$".
- */
diff --git a/scripting/php/phpcups.php b/scripting/php/phpcups.php
deleted file mode 100755 (executable)
index 0fe5719..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/php -f
-<?
-//
-// "$Id: phpcups.php 3603 2003-04-11 18:42:52Z mike $"
-//
-//   PHP test script for CUPS.
-//
-//   Copyright 2007-2011 by Apple Inc.
-//   Copyright 1997-2006 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 "LICENSE.txt"
-//   which should have been included with this file.  If this file is
-//   file is missing or damaged, see the license at "http://www.cups.org/".
-//
-
-// Make sure the module is loaded...
-if(!extension_loaded("phpcups"))
-{
-  dl("phpcups.so");
-}
-
-// Get the list of functions in the module...
-$module    = "phpcups";
-$functions = get_extension_funcs($module);
-
-print("Functions available in the $module extension:\n");
-
-foreach ($functions as $func)
-{
-  print("$func\n");
-}
-
-print("\n");
-
-print("cups_get_dests:\n");
-print_r(cups_get_dests());
-
-print("cups_get_jobs(\"\", 0, -1):\n");
-print_r(cups_get_jobs("", 0, -1));
-
-print("cups_print_file(\"test\", \"../../test/testfile.jpg\", "
-     ."\"testfile.jpg\", ...):\n");
-print_r(cups_print_file("test", "../../test/testfile.jpg", "testfile.jpg",
-                        array("scaling" => "100",
-                             "page-label" => "testfile.jpg")));
-
-print("cups_print_files(\"test\", array(\"../../test/testfile.jpg\", "
-     ."\"../../test/testfile.ps\"), \"testfiles\", ...):\n");
-print_r(cups_print_files("test", array("../../test/testfile.jpg",
-                                       "../../test/testfile.ps"),
-                         "testfiles",
-                         array("scaling" => "100",
-                              "page-label" => "testfile.jpg")));
-
-//
-// End of "$Id: phpcups.php 3603 2003-04-11 18:42:52Z mike $".
-//
-?>