/usr/share/gnudatalanguage/astrolib/dbtitle.pro is in gdl-astrolib 2018.02.16+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | function dbtitle,c,f
;+
; NAME:
; DBTITLE
; PURPOSE:
; function to create title line for routine dbprint
;
; CALLING SEQUENCE:
; result = dbtitle( c, f )
;
; INPUTS:
; c = string array of titles for each item
; f = field length of each item
;
; OUTPUT:
; header string returned as function value
;
; OPERATIONAL NOTES:
; this is a subroutine of DBPRINT.
;
; HISTORY:
; version 1 D. Lindler Sept 86
; Converted to IDL V5.0 W. Landsman September 1997
;-
;------------------------------------------------------------
n=n_elements(c)
h=' '
com = strtrim(c,0) ;header for item with trailing blanks removed
ncom = strlen(com)
for i=0,n-1 do begin ;loop on items
flen=f[i] ;field length
st=string(replicate(byte(32),flen+1));blank field
ipos=((flen-ncom[i]+1)/2)>1 ;starting position in field for comment
strput,st,com[i],ipos ;insert into field
h=h+st ;add to header
end; loop on items
return,h ;return header
end
|