File: printer.pl.in

package info (click to toggle)
psptools 1.2.2-2
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 312 kB
  • ctags: 12
  • sloc: perl: 1,518; sh: 1,398; makefile: 316
file content (51 lines) | stat: -rw-r--r-- 753 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

require 'printcap.pl';

{

#
# printer.pl: utility routines for printers.
#
# Yves Arrouye <Yves.Arrouye@marin.fdn.fr>, 1996.
#

package printer;

#

sub printertype {
    local($printer, $pcap_type) = @_;
    local($ptype);

    &printcap::printcap($printer);

    $pcap_type = 'ty' unless $pcap_type;

    $ptype = $main::PRINTCAP{$pcap_type};

    local($ptypevar) = $printer;
    $ptypevar =~ tr/[a-z]/[A-Z]/;

    $ptype = $ENV{"{$ptypevar}_PRINTER_TYPE"} unless $ptype;
    $ptype = $ENV{'PRINTER_TYPE'} unless $ptype;

    $ptype = $ENV{"{$ptypevar}_PPD"} unless $ptype;
    $ptype = $ENV{'PPD'} unless $ptype;

    return $ptype;
}

#
# printers()
#
# Return a list of available printers.
#

sub printers {
    local($printcap) = '';
}

}

1;