]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/os400/IccProcessor.java
Changed spelling to manifest
[mirror_edk2.git] / Tools / Source / Cpptasks / net / sf / antcontrib / cpptasks / os400 / IccProcessor.java
1 /*
2 *
3 * Copyright 2002-2004 The Ant-Contrib project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 package net.sf.antcontrib.cpptasks.os400;
18 import java.util.Vector;
19 /**
20 * A add-in class for IBM (r) OS/390 compilers and linkers
21 *
22 * @author Hiram Chirino (cojonudo14@hotmail.com)
23 */
24 public class IccProcessor {
25 public static void addWarningSwitch(Vector args, int level) {
26 switch (level) {
27 /*
28 * case 0: args.addElement("/W0"); break;
29 *
30 * case 1: args.addElement("/W1"); break;
31 *
32 * case 2: break;
33 *
34 * case 3: args.addElement("/W3"); break;
35 *
36 * case 4: args.addElement("/W4"); break;
37 */
38 }
39 }
40 public static String getCommandFileSwitch(String cmdFile) {
41 StringBuffer buf = new StringBuffer("@");
42 if (cmdFile.indexOf(' ') >= 0) {
43 buf.append('\"');
44 buf.append(cmdFile);
45 buf.append('\"');
46 } else {
47 buf.append(cmdFile);
48 }
49 return buf.toString();
50 }
51 public static String getIncludeDirSwitch(String includeDir) {
52 return "-I" + includeDir;
53 }
54 public static String[] getOutputFileSwitch(String outPath) {
55 StringBuffer buf = new StringBuffer("-o ");
56 if (outPath.indexOf(' ') >= 0) {
57 buf.append('\"');
58 buf.append(outPath);
59 buf.append('\"');
60 } else {
61 buf.append(outPath);
62 }
63 String[] retval = new String[]{buf.toString()};
64 return retval;
65 }
66 public static boolean isCaseSensitive() {
67 return true;
68 }
69 private IccProcessor() {
70 }
71 }