//\r
if(argstr.length() < 6 && argstr.charAt(3) == '0'){\r
curpstr = pstr;\r
+ npflag = true;\r
continue;\r
}\r
- curpstr = mergeSetting(curpstr, argstr);\r
+ if(curpstr == null){\r
+ curpstr = pstr.concat(argstr.substring(2));\r
+ }else{\r
+ curpstr = mergeSetting(curpstr, argstr);\r
+ }\r
+ npflag = true;\r
} else if (argstr.charAt(1) == 't') {\r
if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
System.out.printf("%s\n", curtstr);\r
}\r
if(argstr.length() < 6 && argstr.charAt(3) == '0'){\r
curtstr = tstr;\r
+ ntflag = true;\r
continue;\r
}\r
- curtstr = mergeSetting(curtstr, argstr);\r
+ if(curtstr == null){\r
+ curtstr = tstr.concat(argstr.substring(2));\r
+ }else{\r
+ curtstr = mergeSetting(curtstr, argstr);\r
+ }\r
+ ntflag = true;\r
} else if (argstr.charAt(1) == 'a') {\r
if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
System.out.printf("%s\n", curastr);\r
}\r
if(argstr.length() < 6 && argstr.charAt(3) == '0'){\r
curastr = astr;\r
+ naflag = true;\r
continue;\r
}\r
- curastr = mergeSetting(curastr, argstr);\r
+ if(curastr == null){\r
+ curastr = astr.concat(argstr.substring(2));\r
+ }else{\r
+ curastr = mergeSetting(curastr, argstr);\r
+ }\r
+ naflag = true;\r
} else if (argstr.charAt(1) == 'c') {\r
if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
System.out.printf("%s\n", curcstr);\r
}\r
if(argstr.length() < 6 && argstr.charAt(3) == '0'){\r
curcstr = cstr;\r
+ ncflag = true;\r
continue;\r
}\r
- curcstr = mergeSetting(curcstr, argstr);\r
+ if(curcstr == null){\r
+ curcstr = pstr.concat(argstr.substring(2));\r
+ }else{\r
+ curcstr = mergeSetting(curcstr, argstr);\r
+ }\r
+ ncflag = true;\r
} else if (argstr.charAt(1) == 'n') {\r
if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
System.out.printf("%s\n", curnstr);\r
}\r
if(argstr.length() < 6 && argstr.charAt(3) == '0'){\r
curnstr = nstr;\r
+ nnflag = true;\r
continue;\r
}\r
- curnstr = mergeSetting(curnstr, argstr);\r
+ if(curnstr == null){\r
+ curnstr = nstr.concat(argstr.substring(2));\r
+ }else{\r
+ curnstr = mergeSetting(curnstr, argstr);\r
+ }\r
+ nnflag = true;\r
} else if (argstr.charAt(1) == 'm') {\r
if(argstr.length() < 4 && argstr.charAt(2) == ' '){\r
System.out.printf("%s\n", curmstr);\r
}\r
mstr += argstr.substring(2);\r
curmstr = mstr;\r
+ nmflag = true;\r
if (argstr.charAt(3) == '0'){\r
mestr += " Disable";\r
} else {\r
mestr += " Enable";\r
}\r
curmestr = mestr;\r
+ nmeflag = true;\r
}\r
\r
}\r
public static String mergeSetting( String S1, String S2){\r
\r
String[] S = S2.split(" ");\r
- if(S1 == null){\r
- S1 = tstr.concat(S2.substring(2));\r
- }else{\r
- for(int i = 1; i < S.length; i++){\r
- if( S1.contains(S[i]) == false ){\r
- S1 = S1.concat(S[i]).concat(" ");\r
- }\r
+\r
+ for(int i = 1; i < S.length; i++){\r
+ if(S1.contains(S[i]) == false){\r
+ S1 = S1.concat(" ").concat(S[i]);\r
}\r
}\r
\r
public static int nlength = 0;\r
public static int mlength = 0;\r
public static int melength = 0;\r
+ \r
+ public static boolean npflag = false;\r
+ public static boolean ntflag = false;\r
+ public static boolean naflag = false;\r
+ public static boolean ncflag = false;\r
+ public static boolean nnflag = false;\r
+ public static boolean nmflag = false;\r
+ public static boolean nmeflag = false;\r
\r
}\r
if (textLine.indexOf("ACTIVE_PLATFORM") != -1) {\r
if(pflag == true){\r
if(textLine.trim().charAt(0) == '#'){\r
- if(ParseParameter.curpstr.length() >= ParseParameter.plength) {\r
+ if(ParseParameter.npflag == true) {\r
bw.write(ParseParameter.curpstr);\r
- bw.newLine();\r
- pflag = false;\r
+ }else{\r
+ bw.write(textLine);\r
}\r
+ bw.newLine();\r
+ pflag = false;\r
continue;\r
}\r
- if(ParseParameter.curpstr.length() >= ParseParameter.plength) {\r
+ if(ParseParameter.npflag == true) {\r
bw.write(ParseParameter.curpstr);\r
} else {\r
bw.write(textLine);\r
} else if (textLine.indexOf("TARGET_ARCH") != -1) {\r
if(aflag == true){\r
if(textLine.trim().charAt(0) == '#'){\r
- if(ParseParameter.curastr.length() >= ParseParameter.alength) {\r
+ if(ParseParameter.naflag == true) {\r
bw.write(ParseParameter.curastr);\r
- bw.newLine();\r
- aflag = false;\r
+ }else{\r
+ bw.write(textLine);\r
}\r
+ bw.newLine();\r
+ aflag = false;\r
continue;\r
}\r
- if(ParseParameter.curastr.length() >= ParseParameter.alength) {\r
+ if(ParseParameter.naflag == true) {\r
bw.write(ParseParameter.curastr);\r
} else {\r
bw.write(textLine);\r
} else if (textLine.indexOf("TARGET") != -1) {\r
if(tflag == true){\r
if(textLine.trim().charAt(0) == '#'){\r
- if(ParseParameter.curtstr.length() >= ParseParameter.tlength) {\r
+ if(ParseParameter.ntflag == true) {\r
bw.write(ParseParameter.curtstr);\r
- bw.newLine();\r
- tflag = false;\r
+ }else{\r
+ bw.write(textLine);\r
}\r
+ bw.newLine();\r
+ tflag = false;\r
continue;\r
}\r
- if(ParseParameter.curtstr.length() >= ParseParameter.tlength) {\r
+ if(ParseParameter.ntflag == true) {\r
bw.write(ParseParameter.curtstr);\r
} else {\r
bw.write(textLine);\r
} else if (textLine.indexOf("TOOL_CHAIN_CONF") != -1) {\r
if(cflag == true){\r
if(textLine.trim().charAt(0) == '#'){\r
- if(ParseParameter.curcstr.length() >= ParseParameter.clength) {\r
+ if(ParseParameter.ncflag == true) {\r
bw.write(ParseParameter.curcstr);\r
- bw.newLine();\r
- cflag = false;\r
+ }else{\r
+ bw.write(textLine);\r
}\r
+ bw.newLine();\r
+ cflag = false;\r
continue;\r
}\r
- if(ParseParameter.curcstr.length() >= ParseParameter.clength) {\r
+ if(ParseParameter.ncflag == true) {\r
bw.write(ParseParameter.curcstr);\r
} else {\r
bw.write(textLine);\r
} else if (textLine.indexOf("TOOL_CHAIN_TAG") != -1) {\r
if(nflag == true){\r
if(textLine.trim().charAt(0) == '#'){\r
- if(ParseParameter.curnstr.length() >= ParseParameter.nlength) {\r
+ if(ParseParameter.nnflag == true) {\r
bw.write(ParseParameter.curnstr);\r
- bw.newLine();\r
- nflag = false;\r
+ }else{\r
+ bw.write(textLine);\r
}\r
+ bw.newLine();\r
+ nflag = false;\r
continue;\r
}\r
- if(ParseParameter.curnstr.length() >= ParseParameter.nlength) {\r
+ if(ParseParameter.nnflag == true) {\r
bw.write(ParseParameter.curnstr);\r
} else {\r
bw.write(textLine);\r
} else if (textLine.indexOf("MAX_CONCURRENT_THREAD_NUMBER") != -1) {\r
if(mflag == true){\r
if(textLine.trim().charAt(0) == '#'){\r
- if(ParseParameter.curmstr.length() >= ParseParameter.mlength) {\r
+ if(ParseParameter.nmflag == true) {\r
bw.write(ParseParameter.curmstr);\r
- bw.newLine();\r
- mflag = false;\r
+ }else{\r
+ bw.write(textLine);\r
}\r
+ bw.newLine();\r
+ mflag = false;\r
continue;\r
}\r
- if(ParseParameter.curmstr.length() >= ParseParameter.mlength) {\r
+ if(ParseParameter.nmflag == true) {\r
bw.write(ParseParameter.curmstr);\r
} else {\r
bw.write(textLine);\r
}else if (textLine.indexOf("MULTIPLE_THREAD") != -1) {\r
if(meflag == true){\r
if(textLine.trim().charAt(0) == '#'){\r
- if(ParseParameter.curmestr.length() >= ParseParameter.melength) {\r
+ if(ParseParameter.nmeflag == true) {\r
bw.write(ParseParameter.curmestr);\r
- bw.newLine();\r
- meflag = false;\r
+ }else{\r
+ bw.write(textLine);\r
}\r
+ bw.newLine();\r
+ meflag = false;\r
continue;\r
}\r
- if(ParseParameter.curmestr.length() >= ParseParameter.melength) {\r
+ if(ParseParameter.nmeflag == true) {\r
bw.write(ParseParameter.curmestr);\r
} else {\r
bw.write(textLine);\r
//\r
//user maybe delete the line *ACTIVE_PLATFORM*=*\r
//\r
- if( (pflag == true) && (ParseParameter.curpstr.length() >= ParseParameter.plength) ){\r
+ if( (pflag == true) && (ParseParameter.npflag == true) ){\r
bw.write(ParseParameter.curpstr);\r
bw.newLine();\r
- } else if ( (tflag == true) && (ParseParameter.curtstr.length() >= ParseParameter.tlength) ){\r
+ } else if ( (tflag == true) && (ParseParameter.ntflag == true) ){\r
bw.write(ParseParameter.curtstr);\r
bw.newLine();\r
- } else if ( (aflag == true) && (ParseParameter.curastr.length() >= ParseParameter.alength) ){\r
+ } else if ( (aflag == true) && (ParseParameter.naflag == true) ){\r
bw.write(ParseParameter.curastr);\r
bw.newLine();\r
- } else if ( (cflag == true) && (ParseParameter.curcstr.length() >= ParseParameter.clength) ){\r
+ } else if ( (cflag == true) && (ParseParameter.ncflag == true) ){\r
bw.write(ParseParameter.curcstr);\r
bw.newLine();\r
- } else if ( (nflag == true) && (ParseParameter.curnstr.length() >= ParseParameter.nlength) ){\r
+ } else if ( (nflag == true) && (ParseParameter.nnflag == true) ){\r
bw.write(ParseParameter.curnstr);\r
bw.newLine();\r
- } else if ( (meflag == true) && (ParseParameter.curmestr.length() >= ParseParameter.melength) ){\r
+ } else if ( (meflag == true) && (ParseParameter.nmeflag == true) ){\r
bw.write(ParseParameter.curmestr);\r
bw.newLine();\r
- } else if ( (mflag == true) && (ParseParameter.curmstr.length() >= ParseParameter.mlength) ){\r
+ } else if ( (mflag == true) && (ParseParameter.nmflag == true) ){\r
bw.write(ParseParameter.curmstr);\r
bw.newLine();\r
}\r