pro doc1liners, path, outfil, doc=doc
;+
;NAME:
;	doc1liners
;PURPOSE:
;	To generate a 1 liners tabular file using the
;	purpose from within the programs documentation header
;HISTORY:
;	Written Mar-95 by M.Morrison
;	28-May-97 (MDM) - Changed output to put a "*" so that
;			  MK_IDL_DOC can process it nicely
;V3.0	12-Jun-97 (MDM) - Changed to use BREAK_DOC instead
;			  of DOC_SUMM
;-
;
;
if (n_elements(path) eq 0) then begin
    path = str2arr(!path, delim=':')
    ss = where(strpos(path, 'mdisw') ne -1)
    path = path(ss)
end
if (n_elements(outfil) eq 0) then outfil = 'go_doc1liners.txt'
;
;; path = get_subdirs('/mdisw/idl')
;
close, 1
openw, 1, outfil
if (keyword_set(doc)) then extra = '* ' else extra = ''
printf, 1, extra + 'GO_DOC1LINERS.PRO  Ver 3.0  Program Run: ' + !stime
printf, 1, ' '
;
for ipath=0,n_elements(path)-1 do begin
    ;
    ff = file_list(path(ipath), '*.pro')
    ;
    if (ff(0) ne '') then begin
	printf, 1, extra + '----------------------------------------------------------'
	printf, 1, extra + '         ' + path(ipath)
	printf, 1, extra + '----------------------------------------------------------'
	;
	for i=0,n_elements(ff)-1 do begin
	    break_doc, ff(i), str=info
	    ;
	    type = strmid(info.type, 0, 1)
	    name = info.filename	;not info.name
	    ;
	    ;purpose = str2arr( info.purpose, delim='\\')
	    purpose = str_replace(info.purpose, '\\', ' ')
	    purpose = parse_lines(purpose, 50)
	    ;
	    str = strmid(name+'                    ', 0, 16) + $
		type + ' ' + $
		purpose(0)
	    print, str
	    printf, 1, str
	    for j=1,n_elements(purpose)-1 do begin
		print, '                  ' + purpose(j)
		printf, 1, '                  ' + purpose(j)
	    end
	end
    end
end
;
close, 1
end