;------------------------------------------------------------- ;+ ; NAME: ; XTEXTFILE ; PURPOSE: ; Explore a text file of unkown format. ; CATEGORY: ; CALLING SEQUENCE: ; xtextfile ; INPUTS: ; KEYWORD PARAMETERS: ; Keywords: ; MAXBUFF=n Max number of bytes to read (def=30000). ; OUTPUTS: ; COMMON BLOCKS: ; NOTES: ; MODIFICATION HISTORY: ; R. Sterner, 1994 Feb 18 ; ; Copyright (C) 1994, Johns Hopkins University/Applied Physics Laboratory ; This software may be used, copied, or redistributed as long as it is not ; sold and this copyright notice is reproduced on each copy made. This ; routine is provided as is without any express or implied warranties ; whatsoever. Other limitations apply as described in the file disclaimer.txt. ;- ;------------------------------------------------------------- pro update, map widget_control, map.edit, get_uval=etab widget_control, map.start, get_val=start ; Buffer start byte. start = start(0)+0L widget_control, map.lo, get_val=lo ; Low offset. widget_control, map.hi, get_val=hi ; high offset. widget_control, map.cs, get_val=cs ; Custom offset. widget_control, map.step, get_val=step ; Custom step size. step = step(0)+0 lst = n_elements(map.buff)-1 index = (lo + hi*30L + cs*step)<(map.maxbuf-250) i1 = index