;+ ; NAME: ; www_help_break ; PURPOSE: ; Break list of html links into lines with effective width of ~80 chars ; CATEGORY: ; www_help ; CALLING SEQUENCE: PRO www_help_break, vis_name, htm_name, content, header, this_section, checkdups=checkdups ; INPUTS: ; vis_name array; type: string ; list of names as they will appear in a browser ; i.e. without the html directives ; htm_name array; type: string ; list of links, including the html directives ; content array; type: string ; current content ; header array; type: structure ; structure with header info ; this_section scalar; type: string ; name of section being processed ; (only used if /checkdups is set) ; OPTIONAL INPUT PARAMETERS: ; /checkdups print a message if duplicate routine names are found ; in the CALLS and SEE ALSO sections. ; OUTPUTS: ; content array; type: string ; same as input array with extra lines at the end ; containing the htm_name links ; INCLUDE: @compile_opt.pro ; On error, return to caller ; RESTRICTIONS: ; 'content' must exist on entry ; PROCEDURE: ; > The accumulated # chars in vis_name determine where the list ; is broken into length of effective length close to 80 chars. ; > A comma is inserted between the entries on a line. ; > In the output list the entries are sorted ; MODIFICATION HISTORY: ; JAN-2001, Paul Hick (UCSD/CASS) ; SEP-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; Suppress warning message for very long word (with no white space) ; if it contains an hmtl hyperlink. ;- tmp = sort(vis_name) vis_name = vis_name[tmp] htm_name = htm_name[tmp] sep = ', ' nline = 72 nvis = n_elements(vis_name) vis_len = strlen(vis_name) FOR i=1L,nvis-1 DO vis_len[i] = vis_len[i-1]+vis_len[i] IF keyword_set(checkdups) THEN BEGIN IF n_elements( uniq(htm_name) ) NE nvis THEN BEGIN print, vis_name message, /info,' duplicate routine name found in '+this_section+' section of '+ $ header.name+' ('+strjoin(header.origin[where(header.origin NE '')],' ')+')' ENDIF ENDIF first = 0 last = (where(vis_len GT nline))[0] WHILE last NE -1 DO BEGIN IF first EQ last THEN BEGIN ; A legal way to create very long words (with no white space) is by ; html hyperlinks. Skip the warning message if this happens. IF strpos(htm_name[first],'