Sat Dec 2 17:01:59 2006 Ben Pfaff Significant cleanup to DO REPEAT. * repeat.c: (struct line_list) Rename struct repeat_line. Use struct ll instead of explicit "next" pointer. Make "file_name" const. Change "const char *line" to "struct substring text". Add `syntax' member. Update all references. (enum repeat_entry_type) Rename repeat_macro_type, update all references. (struct repeat_entry) Rename struct repeat_macro. Use struct ll instead of explicit "next" pointer. Change "char[] id" to "struct substring name". Change "char **replacement" to "struct substring *replacements". Update all references. (struct repeat_block) Use struct ll_list for lists of lines, macros. Change "cur_line" to struct ll *. (cmd_do_repeat) Don't bother adding an empty getl source at all. This saves special-casing an empty source in repeat_read. (parse_specification) Use new find_macro function. (find_macro) New function. (skip_indentor) Removed. (recognize_keyword) Change interface, update callers. (recognize_do_repeat) Ditto. (recognize_end_repeat) Ditto. (parse_lines) Use lex_preprocess_line to preprocess the input line to check for DO REPEAT and END REPEAT, instead of coding it inline. (parse_ids) Need to make a copy of the array parsed by parse_mixed_vars_pool, instead of using it verbatim, because we're using struct substring now. (add_replacement) Use struct substring in interface, instead of const char *, and update all callers. (find_substitution) Rewrite using substring, in terms of find_macro. (do_repeat_filter) Use struct substring to simplify code. (current_line) New function. Sat Dec 2 16:40:12 2006 Ben Pfaff Fix lack of ->name and ->location in DO REPEAT's getl_interface. See bug #15702. * repeat.c: (cmd_do_repeat) Initialize name, location in getl_interface. (do_repeat_read) Adjust semantics of cur_line so that, after the call, it points to the line just returned, instead of to the next line to be returned. Thus, do_repeat_name and do_repeat_location can use cur_line to obtain the info they need. (do_repeat_name) New function. (do_repeat_location) New function. Thu Nov 30 22:01:27 2006 Ben Pfaff * repeat.c (do_repeat_read): Properly handle empty DO REPEAT...END REPEAT block. Fixes bug #18407. Thanks to John Darrington for reporting this bug. Sat Oct 28 16:18:48 WST 2006 John Darrington * repeat.c: Eliminated references to extern variable getl_buf. Sun May 7 18:18:33 2006 Ben Pfaff Fix memory leaks. * repeat.c: (parse_ids) Take pool parameter and allocate all memory from pool. Reduce implementation from loop to single call to parse_mixed_vars_pool(). (store_numeric) Removed. (add_replacement) New function. (parse_numbers) Take pool parameter and allocate all memory from pool. Require ranges to be in increasing order. (parse_strings) Take pool parameter and allocate all memory from pool. Wed May 3 22:45:41 2006 Ben Pfaff Continue reforming procedure execution. In this phase, get rid of many global variables, consolidating procedure execution in procedure.c. Encapsulate transformations in new "struct trns_chain". Also, change implementation of N OF CASES, FILTER, and PROCESS IF from special cases to transformations. * do-if.c: (cmd_do_if) Use finalizer to ensure control stack gets cleared. (do_if_finalize_func) New function. * loop.c: (create_loop_trns) Use finalizer to ensure control stack gets cleared. (loop_trns_finalize) New function. * temporary.c: (global var temporary) Removed. Changed references to use proc_make_temporary_transformations_permanent() or proc_in_temporary_transformations(). (global var temp_dict) Removed. (global var temp_trns) Removed. (cmd_temporary) Reimplement in terms of proc_in_temporary_transformations() and proc_start_temporary_transformations(). (cancel_temporary) Moved to procedure.c, renamed proc_cancel_temporary_transformations(). Thu Mar 2 08:40:33 WST 2006 John Darrington * Moved files from src directory