Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | fixes |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
fdc2de0ac45be5f330e2bd5569d4ad4e |
User & Date: | arnulf 2012-04-17 09:11:14.413 |
Context
2012-04-17
| ||
20:26 | fixes and debug stuff check-in: b55c80e855 user: arnulf tags: trunk | |
09:11 | fixes check-in: fdc2de0ac4 user: arnulf tags: trunk | |
2012-04-16
| ||
22:23 | fixes. t1.test-t99.test run exactly as in RAPL/APWTCL Javascript version!!! check-in: c794b7e4d7 user: arnulf tags: trunk | |
Changes
Changes to src/org/apwtcl/lang/CommandOption.java.
︙ | ︙ | |||
23 24 25 26 27 28 29 | private int id; private Interp interp; public String opt_name; /* Name of this option */ public int opt_code; /* Defined value for this option */ /* the code has to be a unique bit! within an OptionList */ | | | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | private int id; private Interp interp; public String opt_name; /* Name of this option */ public int opt_code; /* Defined value for this option */ /* the code has to be a unique bit! within an OptionList */ public int opt_has_value; /* this option has a value =1 or not = 0 or it can have one or not = -1*/ public ArrayList<ApwtclObj> default_value; /* value for that option to be used as default */ public HashMap<String, Integer> allowed_option_values; /* allowed values for that option */ /* ==================== CommandOption ================================== */ public CommandOption(Interp interp, String opt_name, int opt_code, int opt_has_value, ArrayList<ApwtclObj> default_value, HashMap<String, Integer> allowed_option_values) { oid++; id = oid; this.interp = interp; this.opt_name = opt_name; this.opt_code = opt_code; |
︙ | ︙ |
Changes to src/org/apwtcl/lang/CommandOptionList.java.
︙ | ︙ | |||
58 59 60 61 62 63 64 | /* ==================== toDebugString ===================================== */ public String toDebugString() { StringBuffer str = new StringBuffer(mySelf()+"\n"); return str.toString(); } /* ==================== addOption ===================================== */ | | | | | | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | /* ==================== toDebugString ===================================== */ public String toDebugString() { StringBuffer str = new StringBuffer(mySelf()+"\n"); return str.toString(); } /* ==================== addOption ===================================== */ public void addOption(String option_name, int option_code, int has_opt_value, ArrayList<ApwtclObj> default_value, HashMap<String, Integer>allowed_option_values) { CommandOption option = new CommandOption(interp, option_name, option_code, has_opt_value, default_value, allowed_option_values); option_list.put(option_name, option); opt_code2opt_name.put(option_code, option_name); } /* ==================== hasOption ===================================== */ public boolean hasOption(String option_name) { if (option_list.get(option_name) != null) { return true; } return false; } /* ==================== optionHasValue ===================================== */ public int optionHasValue(String option_name) { CommandOption option = option_list.get(option_name); if (option == null) { return 0; } return option.opt_has_value; } /* ==================== optionCode ===================================== */ public int optionCode(String option_name) { CommandOption option = option_list.get(option_name); |
︙ | ︙ | |||
169 170 171 172 173 174 175 176 177 178 179 180 181 182 | public void resetOptionValues() { option_values = new HashMap<String, ApwtclObj>(); } /* ==================== parseOptions ===================================== */ public int parseOptions(ArrayList<ApwtclObj> args, int start_idx, String msg_start) { String option; num_processed_args = 0; option_flags = 0; err_msg = ""; for (int i = start_idx; i < args.size(); i++) { option = args.get(i).getString(); | > | 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | public void resetOptionValues() { option_values = new HashMap<String, ApwtclObj>(); } /* ==================== parseOptions ===================================== */ public int parseOptions(ArrayList<ApwtclObj> args, int start_idx, String msg_start) { String option; int option_has_value; num_processed_args = 0; option_flags = 0; err_msg = ""; for (int i = start_idx; i < args.size(); i++) { option = args.get(i).getString(); |
︙ | ︙ | |||
200 201 202 203 204 205 206 | sep = ", "; } err_msg = msg.toString(); return ERROR; } num_processed_args++; option_flags |= option_info.opt_code; | | > > > > > > | | | | | | | | | | | | | > | 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | sep = ", "; } err_msg = msg.toString(); return ERROR; } num_processed_args++; option_flags |= option_info.opt_code; option_has_value = optionHasValue(option); if (option_has_value != OPTION_HAS_NO_VALUE) { /* check for option_has_value -1, if the next argument does not start with "-", then it is a value */ if (option_has_value == OPTION_CAN_HAVE_VALUE && args.get(i + 1).getString().charAt(0) != '-') { option_has_value = OPTION_HAS_VALUE; } if (option_has_value == OPTION_HAS_VALUE) { i++; if (i == args.size()) { err_msg = msg_start+" must be an even number of option name and option value"; return ERROR; } num_processed_args++; if (option_info.allowed_option_values != null) { if (option_info.allowed_option_values.get(args.get(i).getString()) == null) { err_msg = msg_start+" bad value for option \""+option+"\" must be: "+option_info.getAllowedOptionValues(); return ERROR; } } option_values.put(option, args.get(i)); } } } //print("num_processed_args!"+num_processed_args+"!"); return OK; } } |
Changes to src/org/apwtcl/lang/Defines.java.
︙ | ︙ | |||
270 271 272 273 274 275 276 277 278 279 280 281 282 283 | public static Hashtable<String, Integer> objTypeString2ObjType = new Hashtable<String, Integer>(); public static Hashtable<Integer, String> objType2String = new Hashtable<Integer, String>(); public static final int LIST_ELEM_STR_SIMPLE = 1; public static final int LIST_ELEM_STR_BRACE = 2; public static final int LIST_ELEM_STR_QUOTE = 3; public static Hashtable<String, Integer> listElemStrString2ListElemStr = new Hashtable<String, Integer>(); public static Hashtable<Integer, String> listElemStr2String = new Hashtable<Integer, String>(); public static final int INTERP_DELETED = 1; public static final int COMMAND_DELETED = 2; | > > > > | 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | public static Hashtable<String, Integer> objTypeString2ObjType = new Hashtable<String, Integer>(); public static Hashtable<Integer, String> objType2String = new Hashtable<Integer, String>(); public static final int LIST_ELEM_STR_SIMPLE = 1; public static final int LIST_ELEM_STR_BRACE = 2; public static final int LIST_ELEM_STR_QUOTE = 3; public static final int OPTION_HAS_NO_VALUE = 0; public static final int OPTION_HAS_VALUE = 1; public static final int OPTION_CAN_HAVE_VALUE = -1; public static Hashtable<String, Integer> listElemStrString2ListElemStr = new Hashtable<String, Integer>(); public static Hashtable<Integer, String> listElemStr2String = new Hashtable<Integer, String>(); public static final int INTERP_DELETED = 1; public static final int COMMAND_DELETED = 2; |
︙ | ︙ |
Changes to src/org/apwtcl/lang/Interp.java.
︙ | ︙ | |||
309 310 311 312 313 314 315 | return namespaces.get(frame_ptr.level - uplevel_dist); } /* ==================== getCommand ===================================== */ public Command getCommand(ApwtclObj obj_ptr, int flags, ArrayList<ArrayList<ApwtclObj>> extra_args_ptr) { String cmd_name = obj_ptr.getString(); ApwtclObj my_obj_ptr; | | > | > | | | | | | | | | | | | | | 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | return namespaces.get(frame_ptr.level - uplevel_dist); } /* ==================== getCommand ===================================== */ public Command getCommand(ApwtclObj obj_ptr, int flags, ArrayList<ArrayList<ApwtclObj>> extra_args_ptr) { String cmd_name = obj_ptr.getString(); ApwtclObj my_obj_ptr; //print("interp getCommand cmd_name!"+cmd_name+"!"); //print("cmd_name!"+cmd_name+"!"+((cmd_name.charAt(0) == ':' ) && (cmd_name.charAt(1) == ':'))); /* FIXME need to also look in global Namespace for aliases with relative path name !! */ if (!((cmd_name.charAt(0) == ':' ) && (cmd_name.charAt(1) == ':'))) { String ns_name = frame_ptr.ns_ptr.full_name; if (!ns_name.equals("::")) { ns_name = ns_name+"::"; } // my_obj_ptr = string_obj_type.newStringObj(ns_name+cmd_name, -1, "INTERP_11"); my_obj_ptr = obj_ptr; } else { my_obj_ptr = obj_ptr; } Command cmd_obj = null; boolean had_extra_args = false; ArrayList<InterpAlias> my_aliases = aliases.get(this); //print("aliases!"+aliases+"!"+my_obj_ptr+"!"+aliases.size()+"!"); if (my_aliases != null) { //print("my_aliases!"+my_aliases+"!"); for (int i = 0; i < my_aliases.size(); i++) { InterpAlias my_alias = my_aliases.get(i); //print("alias!"+i+"!"+my_alias+"!"); InterpAlias have_alias = my_alias.getAlias(empty_string_obj, my_obj_ptr); //print("have_alias!"+have_alias+"!"+my_obj_ptr+"!"); if (have_alias != null) { if (have_alias.params.size() != 0) { /* have arguments !!! */ //print("TARG!"+have_alias.target_cmd.getString()+"!"+have_alias.params+"!"); extra_args_ptr.add(have_alias.params); had_extra_args = true; } obj_ptr = have_alias.target_cmd; break; } } } if (!had_extra_args) { extra_args_ptr.add(null); } cmd_name = obj_ptr.getString(); //print("new cmd_name!"+cmd_name+"!"); |
︙ | ︙ |
Changes to src/org/apwtcl/lang/ItclComponent.java.
︙ | ︙ | |||
14 15 16 17 18 19 20 21 22 23 24 25 26 27 | */ package org.apwtcl.lang; import java.util.ArrayList; public class ItclComponent extends Token implements Debug { private static int oid = 0; private int id; private Interp interp; public int protection; public int type; | > > > > > > | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | */ package org.apwtcl.lang; import java.util.ArrayList; public class ItclComponent extends Token implements Debug { public static CommandOptionList command_option_list; public static boolean initted = false; public static int COMPONENT_OPTION_PUBLIC = 1; public static int COMPONENT_OPTION_INHERIT = 2; private static int oid = 0; private int id; private Interp interp; public int protection; public int type; |
︙ | ︙ | |||
39 40 41 42 43 44 45 46 47 48 49 50 51 52 | this.protection = protection; this.type = type; this.component_name = component_name; this.class_info = class_info; this.flag_inherit = false; this.flag_public = false; } /* ==================== mySelf ================================== */ public String mySelf() { String str = "ItclComponent!"+id+"!"; return str; } | > > > > > | 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | this.protection = protection; this.type = type; this.component_name = component_name; this.class_info = class_info; this.flag_inherit = false; this.flag_public = false; if (!initted) { command_option_list = new CommandOptionList(interp); command_option_list.addOption("-inherit", COMPONENT_OPTION_INHERIT, OPTION_CAN_HAVE_VALUE, null, null); command_option_list.addOption("-public", COMPONENT_OPTION_PUBLIC, OPTION_HAS_VALUE, null, null); } } /* ==================== mySelf ================================== */ public String mySelf() { String str = "ItclComponent!"+id+"!"; return str; } |
︙ | ︙ | |||
66 67 68 69 70 71 72 | str.append(" inherit: "+flag_inherit+"\n"); return str.toString(); } /* ==================== storeComponentInfo ================================== */ public int storeComponentInfo(ArrayList<ApwtclObj> args) { //print("storeComponentInfo!"+args+"!"); | < < < | | | | < > > | > > | > | | < > > | | < | > | < > > | > | < > > | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | str.append(" inherit: "+flag_inherit+"\n"); return str.toString(); } /* ==================== storeComponentInfo ================================== */ public int storeComponentInfo(ArrayList<ApwtclObj> args) { //print("storeComponentInfo!"+args+"!"); int processed_args; int option_flags; ArrayList<ApwtclObj> my_args = new ArrayList<ApwtclObj>(); for (int i = 1; i < args.size(); i++) { my_args.add(args.get(i)); } //print("args!"+args+"!"+my_args+"!"); command_option_list.resetOptionValues(); if (command_option_list.parseOptions(my_args, 0, "itclComponent") != OK) { //print("ERR!"+command_option_list.getErrorMsg()+"!"); interp.setResultString(command_option_list.getErrorMsg()); return ERROR; } option_flags = command_option_list.getOptionFlags(); processed_args = command_option_list.getNumProcessedArgs(); if (args.size() - processed_args > 0) { interp.setResultString("usage: component -public <typemethod>? ?-inherit ?<flag>?"); return ERROR; } if ((option_flags & COMPONENT_OPTION_INHERIT) != 0) { // if (options.get("-inherit") != null) { // if (interp.int_obj_type.getBool(options.get("-inherit"), val) != OK) { // return ERROR; // } // } else { // if (interp.int_obj_type.getBool(interp.string_obj_type.newStringObj("1", -1, "ITCL_COMPONENT_1"), val) != OK) { // return ERROR; // } // } /* FIXME may have value here !! */ // flag_inherit = val.get(0); flag_inherit = true; } if ((option_flags & COMPONENT_OPTION_PUBLIC) != 0) { /* FIXME ned to get value here !! */ // flag_public = options.get("-public"); flag_public = true; } return OK; } } |
Changes to src/org/apwtcl/lang/ItclOption.java.
︙ | ︙ | |||
37 38 39 40 41 42 43 | public String option_name; public String option_class_name; public String option_class; public int protection; public int type; public ItclClass class_info; | | | | | | | | | | | | | | | | | > > > > > > > > > | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | public String option_name; public String option_class_name; public String option_class; public int protection; public int type; public ItclClass class_info; public boolean read_only; public ApwtclObj cget_method; public ApwtclObj configure_method; public ApwtclObj validate_method; public ApwtclObj cget_methodvar; public ApwtclObj configure_methodvar; public ApwtclObj validate_methodvar; public ApwtclObj default_value; public String my_name; /* ==================== ItclOption ================================== */ public ItclOption(Interp interp, int protection, int type, ApwtclObj option_name, ItclClass class_info) { oid++; id = oid; if (!initted) { command_option_list = new CommandOptionList(interp); command_option_list.addOption("-readonly", ITCL_OPTION_READONLY, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-default", ITCL_OPTION_DEFAULT, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-cgetmethod", ITCL_OPTION_CGET_METHOD, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-configuremethod", ITCL_OPTION_CONFIGURE_METHOD, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-validatemethod", ITCL_OPTION_VALIDATE_METHOD, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-cgetmethodvar", ITCL_OPTION_CGET_METHODVAR, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-configuremethodvar", ITCL_OPTION_CONFIGURE_METHODVAR, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-validatemethodvar", ITCL_OPTION_VALIDATE_METHODVAR, OPTION_HAS_VALUE, null, null); } this.interp = interp; this.option_name = null; this.option_class_name = null; this.option_class = null; this.read_only = false; this.cget_method = null; this.configure_method = null; this.validate_method = null; this.cget_methodvar = null; this.configure_methodvar = null; this.validate_methodvar = null; this.default_value = null; switch (interp.class_type) { case ITCL_CLASS: interp.setResultString("option not allowed for: \""+getItclClassTypeString(interp.class_type)+"\""); return; case ITCL_EXTENDED_CLASS: if (interp.list_obj_type.listLength(option_name) != 3) { interp.setResultString("option_name needs a name, a class_name and a class"); |
︙ | ︙ | |||
100 101 102 103 104 105 106 | default: interp.setResultString("option not allowed for: \""+getItclClassTypeString(interp.class_type)+"\""); return; } this.protection = protection; this.type = type; this.class_info = class_info; | < < < < < < < < | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | default: interp.setResultString("option not allowed for: \""+getItclClassTypeString(interp.class_type)+"\""); return; } this.protection = protection; this.type = type; this.class_info = class_info; my_name = "ItclOption"; } /* ==================== mySelf ================================== */ public String mySelf() { String str = "ItclOption!"+id+"!"; return str; |
︙ | ︙ |
Changes to src/org/apwtcl/lang/TclTest.java.
︙ | ︙ | |||
208 209 210 211 212 213 214 | testVerboseOptionString2TestVerboseOption.put("setup", TEST_VERBOSE_OPTION_SETUP); testVerboseOptionString2TestVerboseOption.put("t", TEST_VERBOSE_OPTION_T); testVerboseOptionString2TestVerboseOption.put("start", TEST_VERBOSE_OPTION_START); command_option_list = new CommandOptionList(interp); command_option_list.resetOptionValues(); my_obj = makeDefaultValueObj("", "TCL_TEST_1"); | | | | | | | | | | | | | | | | | | | | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | testVerboseOptionString2TestVerboseOption.put("setup", TEST_VERBOSE_OPTION_SETUP); testVerboseOptionString2TestVerboseOption.put("t", TEST_VERBOSE_OPTION_T); testVerboseOptionString2TestVerboseOption.put("start", TEST_VERBOSE_OPTION_START); command_option_list = new CommandOptionList(interp); command_option_list.resetOptionValues(); my_obj = makeDefaultValueObj("", "TCL_TEST_1"); command_option_list.addOption("-asidefromdir", TEST_OPTION_ASIDEFROMDIR, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("", "TCL_TEST_2"); command_option_list.addOption("-constraints", TEST_OPTION_CONSTRAINTS, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("0", "TCL_TEST_3"); command_option_list.addOption("-debug", TEST_OPTION_DEBUG, OPTION_HAS_VALUE, my_obj, testDebugOptionString2TestDebugOption); my_obj = makeDefaultValueObj("stderr", "TCL_TEST_4"); command_option_list.addOption("-errfile", TEST_OPTION_ERRFILE, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("*.test", "TCL_TEST_5"); command_option_list.addOption("-file", TEST_OPTION_FILE, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("0", "TCL_TEST_6"); command_option_list.addOption("-limitconstraints", TEST_OPTION_LIMITCONSTRAINTS, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("", "TCL_TEST_7"); command_option_list.addOption("-load", TEST_OPTION_LOAD, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("", "TCL_TEST_8"); command_option_list.addOption("-loadfile", TEST_OPTION_LOADFILE, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("*", "TCL_TEST_9"); command_option_list.addOption("-match", TEST_OPTION_MATCH, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("l.*.test", "TCL_TEST_10"); command_option_list.addOption("-notfile", TEST_OPTION_NOTFILE, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("stdout", "TCL_TEST_11"); command_option_list.addOption("-outfile", TEST_OPTION_OUTFILE, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("0", "TCL_TEST_12"); command_option_list.addOption("-preservecore", TEST_OPTION_PRESERVECORE, OPTION_HAS_VALUE, my_obj, testPreservecoreOptionString2TestPreservecoreOption); my_obj = makeDefaultValueObj("*", "TCL_TEST_13"); command_option_list.addOption("-relateddir", TEST_OPTION_RELATEDDIR, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("0", "TCL_TEST_14"); command_option_list.addOption("-singleproc", TEST_OPTION_SINGLEPROC, OPTION_HAS_VALUE, my_obj, testSingleprocOptionString2TestSingleprocOption); my_obj = makeDefaultValueObj("", "TCL_TEST_15"); command_option_list.addOption("-skip", TEST_OPTION_SKIP, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj(".", "TCL_TEST_16"); command_option_list.addOption("-testdir", TEST_OPTION_TESTDIR, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj(".", "TCL_TEST_17"); command_option_list.addOption("-tmpdir", TEST_OPTION_TMPDIR, OPTION_HAS_VALUE, my_obj, null); my_obj = makeDefaultValueObj("body", "TCL_TEST_18"); my_obj.add(interp.string_obj_type.newStringObj("error", -1, "TCL_TEST_19")); command_option_list.addOption("-verbose", TEST_OPTION_VERBOSE, 1, my_obj, testVerboseOptionString2TestVerboseOption); } /* ==================== mySelf ================================== */ public String mySelf() { String str = "TclTest!"+id+"!"; return str; } |
︙ | ︙ |
Changes to src/org/apwtcl/lang/cmd/LsearchCommand.java.
︙ | ︙ | |||
77 78 79 80 81 82 83 | ApwtclObj pattern; int rc = OK; int eq = 0; boolean done = false; if (!initted) { command_option_list = new CommandOptionList(interp); | | | | | | | | | | | | | | | | 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | ApwtclObj pattern; int rc = OK; int eq = 0; boolean done = false; if (!initted) { command_option_list = new CommandOptionList(interp); command_option_list.addOption("-all", LSEARCH_OPTION_ALL, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-ascii", LSEARCH_OPTION_ASCII, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-dictionary", LSEARCH_OPTION_DICTIONARY, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-exact", LSEARCH_OPTION_EXACT, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-glob", LSEARCH_OPTION_GLOB, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-increasing", LSEARCH_OPTION_INCREASING, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-inline", LSEARCH_OPTION_INLINE, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-integer", LSEARCH_OPTION_INTEGER, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-nocase", LSEARCH_OPTION_NOCASE, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-not", LSEARCH_OPTION_NOT, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-real", LSEARCH_OPTION_REAL, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-regexp", LSEARCH_OPTION_REGEXP, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-sorted", LSEARCH_OPTION_SORTED, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-start", LSEARCH_OPTION_START, OPTION_HAS_VALUE, null, null); initted = true; } if (list_start_idx == args.size() - 1) { print(usage); return ERROR; } command_option_list.resetOptionValues(); |
︙ | ︙ |
Changes to src/org/apwtcl/lang/cmd/LsortCommand.java.
︙ | ︙ | |||
37 38 39 40 41 42 43 | ApwtclObj res_obj; int i; int ret_code; SortInfo info = new SortInfo(interp); if (!initted) { command_option_list = new CommandOptionList(interp); | | | | | | | | | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | ApwtclObj res_obj; int i; int ret_code; SortInfo info = new SortInfo(interp); if (!initted) { command_option_list = new CommandOptionList(interp); command_option_list.addOption("-ascii", SORT_OPTION_ASCII, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-command", SORT_OPTION_COMMAND, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-decreasing", SORT_OPTION_DECREASING, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-index", SORT_OPTION_INDEX, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-increasing", SORT_OPTION_INCREASING, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-integer", SORT_OPTION_INTEGER, OPTION_HAS_NO_VALUE, null, null); command_option_list.addOption("-nocase", SORT_OPTION_NOCASE, OPTION_HAS_NO_VALUE, null, null); initted = true; } if (args.size() < 2) { interp.wrongNumArgs(1, args, "?options? list"); return ERROR; } |
︙ | ︙ |
Changes to src/org/apwtcl/lang/cmd/NamespaceCommand.java.
︙ | ︙ | |||
58 59 60 61 62 63 64 | interp.command_obj_type.registerNativeSubCommand("::namespace", "qualifiers", "NamespaceCommand"); interp.command_obj_type.registerNativeSubCommand("::namespace", "tail", "NamespaceCommand"); interp.command_obj_type.registerNativeSubCommand("::namespace", "upvar", "NamespaceCommand"); interp.command_obj_type.registerNativeSubCommand("::namespace", "unknown", "NamespaceCommand"); interp.command_obj_type.registerNativeSubCommand("::namespace", "which", "NamespaceCommand"); if (!initted) { command_option_list = new CommandOptionList(interp); | | | | | | | | | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | interp.command_obj_type.registerNativeSubCommand("::namespace", "qualifiers", "NamespaceCommand"); interp.command_obj_type.registerNativeSubCommand("::namespace", "tail", "NamespaceCommand"); interp.command_obj_type.registerNativeSubCommand("::namespace", "upvar", "NamespaceCommand"); interp.command_obj_type.registerNativeSubCommand("::namespace", "unknown", "NamespaceCommand"); interp.command_obj_type.registerNativeSubCommand("::namespace", "which", "NamespaceCommand"); if (!initted) { command_option_list = new CommandOptionList(interp); command_option_list.addOption("-command", NAMESPACE_ENSEMBLE_OPTION_COMMAND, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-map", NAMESPACE_ENSEMBLE_OPTION_MAP, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-namespace", NAMESPACE_ENSEMBLE_OPTION_NAMESPACE, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-parameters", NAMESPACE_ENSEMBLE_OPTION_PARAMETERS, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-prefixes", NAMESPACE_ENSEMBLE_OPTION_PREFIXES, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-subcommands", NAMESPACE_ENSEMBLE_OPTION_SUBCOMMANDS, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-unknown", NAMESPACE_ENSEMBLE_OPTION_UNKNOWN, OPTION_HAS_VALUE, null, null); initted = true; } return OK; } /* ==================== namespaceCmd ================================== */ public int namespaceCmd(Interp interp, ArrayList<ApwtclObj> args) { |
︙ | ︙ |
Changes to src/org/apwtcl/lang/cmd/ReturnCommand.java.
︙ | ︙ | |||
49 50 51 52 53 54 55 | ApwtclObj error_info_obj; ApwtclObj options_obj = null; // ApwtclObj r = null; int num_processed_args = 0; if (!initted) { command_option_list = new CommandOptionList(interp); | | | | | | | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | ApwtclObj error_info_obj; ApwtclObj options_obj = null; // ApwtclObj r = null; int num_processed_args = 0; if (!initted) { command_option_list = new CommandOptionList(interp); command_option_list.addOption("-code", RETURN_OPTION_CODE, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-errorcode", RETURN_OPTION_ERRORCODE, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-errorinfo", RETURN_OPTION_ERRORINFO, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-level", RETURN_OPTION_LEVEL, OPTION_HAS_VALUE, null, null); command_option_list.addOption("-options", RETURN_OPTION_OPTIONS, OPTION_HAS_VALUE, null, null); initted = true; } interp.return_code = RETURN; // if (args.size() == 1) { /* seems to be a return value only */ // r = args.get(1); // } |
︙ | ︙ |
Changes to src/org/apwtcl/lang/pkgIndex.tcl.
1 2 3 4 5 6 7 8 9 10 | interp alias {} ::tcltest::test {} ::tcltest test interp alias {} ::tcltest::configure {} ::tcltest configure interp alias {} ::itcl::class {} ::itcl class interp alias {} ::itcl::extendedclass {} ::itcl extendedclass interp alias {} ::itcl::type {} ::itcl type interp alias {} ::itcl::macro {} ::itcl macro interp alias {} ::itcl::body {} ::itcl body interp alias {} ::itcl::mkmember {} ::itcl mkmember interp alias {} ::itcl::internal::classcget {} ::itcl internal classcget interp alias {} ::itcl::internal::classconfigure {} ::itcl internal classconfigure | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 | interp alias {} ::tcltest::test {} ::tcltest test interp alias {} ::tcltest::configure {} ::tcltest configure interp alias {} tcltest::test {} ::tcltest test interp alias {} tcltest::configure {} ::tcltest configure interp alias {} ::itcl::class {} ::itcl class interp alias {} itcl::class {} ::itcl class interp alias {} ::itcl::extendedclass {} ::itcl extendedclass interp alias {} ::itcl::type {} ::itcl type interp alias {} ::itcl::macro {} ::itcl macro interp alias {} ::itcl::body {} ::itcl body interp alias {} ::itcl::mkmember {} ::itcl mkmember interp alias {} ::itcl::internal::classcget {} ::itcl internal classcget interp alias {} ::itcl::internal::classconfigure {} ::itcl internal classconfigure |
︙ | ︙ |