From: <cr...@us...> - 2008-07-23 10:21:08
|
Revision: 4333 http://jnode.svn.sourceforge.net/jnode/?rev=4333&view=rev Author: crawley Date: 2008-07-23 10:21:05 +0000 (Wed, 23 Jul 2008) Log Message: ----------- Revised the syntax for modifiers in @...@ sequences Modified Paths: -------------- trunk/all/conf-source/jnode.properties.template trunk/distr/src/configure/org/jnode/configure/adapter/BasePropertyFileAdapter.java trunk/distr/src/configure/org/jnode/configure/adapter/PropertyValueCodec.java Modified: trunk/all/conf-source/jnode.properties.template =================================================================== --- trunk/all/conf-source/jnode.properties.template 2008-07-21 13:28:44 UTC (rev 4332) +++ trunk/all/conf-source/jnode.properties.template 2008-07-23 10:21:05 UTC (rev 4333) @@ -11,19 +11,19 @@ # custom.plugin-list.dir = ${root.dir}/local/plugin-lists/ # If non-empty, no default initjars will be built. -...@no...itjars=#!@ +...@no...itjars/=#@ # ----------------------------------------------- # Settings for the bootdisk image # If non-empty, no bootdisk image will be built. -...@no...otdisk=#!@ +...@no...otdisk/=#@ # ----------------------------------------------- # Settings for the netboot build # If non-empty, no netboot directory will be built. -...@no...boot=#!@ +...@no...boot/=#@ # ----------------------------------------------- # Settings for the memory manager @@ -31,7 +31,7 @@ # Default memory manager: org.jnode.vm.memmgr.def # MMTk NoGC based memory manager (still very beta): org.jnode.vm.memmgr.mmtk.nogc # MMTk GenRC based memory manager (still very alpha): org.jnode.vm.memmgr.mmtk.genrc -...@jn...=@ +...@jn.../=@ # ----------------------------------------------- # Settings for the document-plugins task @@ -76,7 +76,7 @@ # ----------------------------------------------- # The virtual PC's memory size in Mbytes -...@jn...msize=@ +...@jn...msize/=@ # Uncomment and edit this line if you want to override the settings # in the 'jnode-x86-*.vmx' file. For example, you may want to include Modified: trunk/distr/src/configure/org/jnode/configure/adapter/BasePropertyFileAdapter.java =================================================================== --- trunk/distr/src/configure/org/jnode/configure/adapter/BasePropertyFileAdapter.java 2008-07-21 13:28:44 UTC (rev 4332) +++ trunk/distr/src/configure/org/jnode/configure/adapter/BasePropertyFileAdapter.java 2008-07-23 10:21:05 UTC (rev 4333) @@ -239,17 +239,13 @@ } private String removeModifiers(StringBuffer sb) { - String validModifiers = codec.getValidModifiers(); - StringBuffer sb2 = new StringBuffer(1); - for (int i = sb.length() - 1; i >= 0; i--) { - char ch = sb.charAt(i); - if (validModifiers.contains(Character.toString(ch))) { - sb2.insert(0, ch); - sb.setLength(i); - } else { - break; - } + int index = sb.lastIndexOf("/"); + if (index >= 0) { + String modifiers = sb.substring(index + 1); + sb.setLength(index); + return modifiers; + } else { + return ""; } - return sb2.toString(); } } Modified: trunk/distr/src/configure/org/jnode/configure/adapter/PropertyValueCodec.java =================================================================== --- trunk/distr/src/configure/org/jnode/configure/adapter/PropertyValueCodec.java 2008-07-21 13:28:44 UTC (rev 4332) +++ trunk/distr/src/configure/org/jnode/configure/adapter/PropertyValueCodec.java 2008-07-23 10:21:05 UTC (rev 4333) @@ -25,15 +25,14 @@ public String encodeProperty(String propName, String propValue, String modifiers) { if (modifiers.contains("=")) { - if (propValue == null || propValue.equals("") && modifiers.contains("!")) { + if (propValue == null || propValue.equals("")) { if (modifiers.contains("#")) { return "#" + encodeText(propName) + "="; - } else { + } else if (modifiers.contains("!")) { return ""; } - } else { - return encodeText(propName) + "=" + encodeText(propValue); } + return encodeText(propName) + "=" + encodeText(propValue); } else { if (propValue == null) { return ""; @@ -64,6 +63,12 @@ case '\f': sb.append("\\f"); break; + case '=': + sb.append("\\="); + break; + case ':': + sb.append("\\:"); + break; default: if (ch < ' ' || (ch >= 127 && ch < 160) || ch > 255) { String digits = Integer.toHexString(ch); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |