/[mojave]/metaprl/refiner/reflib/rformat.ml
ViewVC logotype

Diff of /metaprl/refiner/reflib/rformat.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3583 by nogin, Tue Feb 26 20:21:12 2002 UTC revision 3584 by nogin, Thu Apr 25 15:28:40 2002 UTC
# Line 298  Line 298 
298   *)   *)
299  let flush_formatting buf =  let flush_formatting buf =
300     match buf.buf_info with     match buf.buf_info with
301        Formatting stack ->        Formatting { formatting_stack =
302           let rec flush = function         [{ formatting_commands = commands;
303              [{ formatting_commands = commands;            formatting_index = index
304                 formatting_index = index          }] } ->
305               }] ->           buf.buf_info <- Unformatted { unformatted_commands = List.rev commands;
306                 buf.buf_info <- Unformatted { unformatted_commands = List.rev commands;                                         unformatted_index = index
307                                               unformatted_index = index                           }
308                                 }      | Formatting _ ->
309            | { formatting_commands = commands;           raise (Invalid_argument "Rformat.flush_formatting: unballanced buffer (use debug_dform_depth to debug)")
               formatting_index = index;  
               formatting_buf = buf  
             } :: tl ->  
                eprintf "Unbalanced buffer%t" eflush;  
                buf.buf_info <- Unformatted { unformatted_commands = List.rev commands;  
                                              unformatted_index = index  
                                };  
                flush tl  
           | [] ->  
                raise (Invalid_argument "Rformat.flush_formatting")  
          in  
             flush stack.formatting_stack  
   
310      | Unformatted _      | Unformatted _
311      | Formatted _ ->      | Formatted _ ->
312           ()           ()
313    
314    let zone_depth = function
315       Buf { buf_info = Formatting stack } -> List.length stack.formatting_stack - 1
316     | _ -> 0
317    
318  (*  (*
319   * Start a new zone.   * Start a new zone.
320   *)   *)

Legend:
Removed from v.3583  
changed lines
  Added in v.3584

  ViewVC Help
Powered by ViewVC 1.1.26