< prev index next >

src/java.desktop/unix/classes/sun/print/PrintServiceLookupProvider.java

Print this page
rev 59106 : imported patch client

*** 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 >