< prev index next >
src/java.desktop/unix/classes/sun/print/PrintServiceLookupProvider.java
Print this page
rev 59383 : [mq]: final
*** 1,7 ****
/*
! * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 149,162 ****
static boolean isMac() {
return osname.startsWith("Mac");
}
- static boolean isSysV() {
- return osname.equals("SunOS");
- }
-
static boolean isLinux() {
return (osname.equals("Linux"));
}
static boolean isBSD() {
--- 149,158 ----
*** 299,309 ****
int lastIndex = printerURIs[i].lastIndexOf("/");
printers[i] = printerURIs[i].substring(lastIndex+1);
}
}
} else {
! if (isMac() || isSysV()) {
printers = getAllPrinterNamesSysV();
} else if (isAIX()) {
printers = getAllPrinterNamesAIX();
} else { //BSD
printers = getAllPrinterNamesBSD();
--- 295,305 ----
int lastIndex = printerURIs[i].lastIndexOf("/");
printers[i] = printerURIs[i].substring(lastIndex+1);
}
}
} else {
! if (isMac()) {
printers = getAllPrinterNamesSysV();
} else if (isAIX()) {
printers = getAllPrinterNamesAIX();
} else { //BSD
printers = getAllPrinterNamesBSD();
*** 483,493 ****
e);
}
}
/* fallback if nothing not having a printer at this point */
PrintService printer = null;
! if (isMac() || isSysV()) {
printer = getNamedPrinterNameSysV(name);
} else if (isAIX()) {
printer = getNamedPrinterNameAIX(name);
} else {
printer = getNamedPrinterNameBSD(name);
--- 479,489 ----
e);
}
}
/* fallback if nothing not having a printer at this point */
PrintService printer = null;
! if (isMac()) {
printer = getNamedPrinterNameSysV(name);
} else if (isAIX()) {
printer = getNamedPrinterNameAIX(name);
} else {
printer = getNamedPrinterNameBSD(name);
*** 651,661 ****
if (printerInfo != null && printerInfo.length >= 2) {
defaultPrinter = printerInfo[0];
psuri = printerInfo[1];
}
} else {
! if (isMac() || isSysV()) {
defaultPrinter = getDefaultPrinterNameSysV();
} else if (isAIX()) {
defaultPrinter = getDefaultPrinterNameAIX();
} else {
defaultPrinter = getDefaultPrinterNameBSD();
--- 647,657 ----
if (printerInfo != null && printerInfo.length >= 2) {
defaultPrinter = printerInfo[0];
psuri = printerInfo[1];
}
} else {
! if (isMac()) {
defaultPrinter = getDefaultPrinterNameSysV();
} else if (isAIX()) {
defaultPrinter = getDefaultPrinterNameAIX();
} else {
defaultPrinter = getDefaultPrinterNameBSD();
*** 870,880 ****
static String[] execCmd(final String command) {
ArrayList<String> results = null;
try {
final String[] cmd = new String[3];
! if (isSysV() || isAIX()) {
cmd[0] = "/usr/bin/sh";
cmd[1] = "-c";
cmd[2] = "env LC_ALL=C " + command;
} else {
cmd[0] = "/bin/sh";
--- 866,876 ----
static String[] execCmd(final String command) {
ArrayList<String> results = null;
try {
final String[] cmd = new String[3];
! if (isAIX()) {
cmd[0] = "/usr/bin/sh";
cmd[1] = "-c";
cmd[2] = "env LC_ALL=C " + command;
} else {
cmd[0] = "/bin/sh";
< prev index next >