c
c     Copyright (c) 1999,2000, Compaq Computer Corporation
c
c     See the file "license.terms" for information on usage and redistribution
c     of this file, and for a DISCLAIMER OF ALL WARRANTIES.
c
c     Change default plot information
c
      subroutine change_defaults
      implicit none
c
c     Programmer: John Faricelli
c     Date: 19-Jun-90
c
      include 'const.h'
      include 'sysdep.cmn'
      include 'plot.cmn'
      include 'units.cmn'
      include 'defaults.cmn'
c
c     locals
c
      character*3 chdum4
      character*20 chdum2, hcdev
      character*25 psfont, tempfont
      integer int_vec(1), idum, pm_decode_psfont
      real    real_vec(1)
c
c     Menu stuff
      integer item_number, ilen, string_len
      character*80 string
      character*2  units_delim
      character*3  ch
      logical eof, reuse_last_input
c
      if( l_autoscale ) then
         chdum4 = 'yes'
      else
         chdum4 = 'no '
      endif
c
      units_delim(1:1) = left_unit_delim
      units_delim(2:2) = right_unit_delim
c
      if( default_hidden_method .eq.
     1    HIDDEN_LINES_WITH_HORIZON_FCN ) then
         chdum2 = 'hidden_line'
      else if( default_hidden_method .eq.
     1         HIDDEN_LINES_WITH_FILL_AREA ) then
         chdum2 = 'color_bands'
      else if( default_hidden_method .eq.
     1         HIDDEN_LINES_HISTOGRAM ) then
         chdum2 = 'histogram'
      else if( default_hidden_method .eq. 0 ) then
         chdum2 = 'device_dependent'
      else
         chdum2 = 'unknown'
      endif
c
      call pm_lookup_psfontid(ps_font_id,psfont)
c
100   call clear_screen
      call display_string(2 ,1 ,'1) Linewidth scale factor',25,0)
      call display_string(3 ,1 ,'2) Hidden line method',21,0)
      call display_string(4 ,1 ,'3) Default hardcopy device',26,0)
      call display_string(5 ,1 ,'4) Workstation window scale factor',
     +                    34,0)
      call display_string(6 ,1 ,'5) Unit of length used in plots',31,0)
      call display_string(7 ,1 ,
     +        '6) Autoscale of 1D/2D/3D coordinate axes',40,0)
      call display_string(8 ,1 ,'7) Text scale factor',21,0)
      call display_string(9 ,1 ,'8) Reset colors to defaults',28,0)
      call display_string(10,1 ,'9) Postscript font',18,0)
      call display_string(11,1 ,'10) Units delimiters',20,0)
c
      call display_real  (2 ,38,global_linewidth_scale,1)
      call display_string(3 ,42,chdum2,20,1)
      call display_string(4 ,42,default_hc_name,20,1)
      call display_real  (5 ,38,plot_scale_factor,1)
      call display_string(6 ,42,pm_length_unit,20,1)
      call display_string(7 ,42,chdum4,3,1)
      call display_real  (8 ,38,global_text_scale,1)
      call display_string(10,42,psfont,25,1)
      call display_string(11,42,units_delim,2,1)
c
200   call display_prompt(
     1 'Enter number of item to modify, Repaint, Exit/Quit:')
      if( reuse_last_input ) then
         reuse_last_input = .FALSE.
      else
         call read_from_input_area(string, eof)
      endif
      if( eof ) goto 200
      call upcase(string)
      if( string(1:1) .eq. 'E' .or. string(1:1) .eq. 'Q' ) then
         goto 300
      elseif (string(1:1) .eq. 'R' ) then
         goto 100
      else
         read(string,*,err=1000) item_number
         if( item_number .lt. 1 .or. item_number .gt. 10 ) then
            call display_message('Item number out of range')
            goto 200
         else
c           Decode what item to get
            if( item_number .eq. 1 ) then
               real_vec(1) = global_linewidth_scale
               call get_reals_with_prompt(real_vec,1,
     1             'Enter linewidth scale (0.1 < x < 5.0)')
               global_linewidth_scale = real_vec(1)
               global_linewidth_scale =
     1             MAX(MIN(global_linewidth_scale,5.0),0.1)
               call display_real  (2 ,38,global_linewidth_scale,1)
            else if( item_number .eq. 2 ) then
               int_vec(1) = default_hidden_method
               call get_string_with_prompt(ch,
     1'Methods: device_dependent, color_bands, hidden_lines, histogram')
               call upcase(ch)
               if(ch(1:1) .eq. 'D' ) then
                  chdum2 = 'device_dependent'
                  default_hidden_method = 0
               else if(ch(1:1) .eq. 'C' ) then
                  chdum2 = 'color_bands'
                  default_hidden_method = HIDDEN_LINES_WITH_FILL_AREA
               else if(ch(1:3) .eq. 'HID' ) then
                  chdum2 = 'hidden_line'
                  default_hidden_method = HIDDEN_LINES_WITH_HORIZON_FCN
               else if(ch(1:3) .eq. 'HIS' ) then
                  chdum2 = 'histogram'
                  default_hidden_method = HIDDEN_LINES_HISTOGRAM
               else
                  call display_message('Invalid hidden line method')
               endif
               call display_string(3 ,42,chdum2,20,1)
            else if( item_number .eq. 3 ) then
               hcdev = ' '
               call get_string_with_prompt(hcdev,
     1            'hp7550 ln03 postscript color_postscript ' //
     2            'lj250 lj250hires ddif eps color_eps')
               if( hcdev(1:1) .ne. ' ' ) then
                  call upcase(hcdev)
                  if( hcdev(1:7) .eq. 'COLOR_P' ) then
                     default_hc_name = 'color_postscript'
                  else if( hcdev(1:7) .eq. 'COLOR_E' ) then
                     default_hc_name = 'color_eps'
                  else if( hcdev(1:1) .eq. 'E' ) then
                     default_hc_name = 'eps'
                  else if( hcdev(1:1) .eq. 'H' ) then
                     default_hc_name = 'hp7550'
                  else if( hcdev(1:1) .eq. 'L' ) then
                     if( hcdev(2:2) .eq. 'N' ) then
                        default_hc_name = 'ln03plus'
                     else if( hcdev(2:2) .eq. 'J' ) then
                        if( hcdev(6:6) .eq. 'H' ) then
                           default_hc_name = 'lj250hires'
                        else
                           default_hc_name = 'lj250'
                        endif
                     else if( hcdev(2:2) .eq. ' ' ) then
                        default_hc_name = 'ln03plus'
                     endif
                  else if( hcdev(1:1) .eq. 'P' ) then
                     default_hc_name = 'postscript'
                  else if( hcdev(1:1) .eq. 'D' ) then
                     default_hc_name = 'ddif'
                  endif
               endif
               call display_string(4 ,42,default_hc_name,20,1)
            else if( item_number .eq. 4 ) then
               real_vec(1) = plot_scale_factor
               call get_reals_with_prompt(real_vec,1,
     1           'Window scale factor (0.1 to 1.0 of full screen)')
               plot_scale_factor = real_vec(1)
               plot_scale_factor = MAX(MIN(plot_scale_factor,1.0),0.1)
               call display_real  (5 ,38,plot_scale_factor,1)
            else if( item_number .eq. 5 ) then
               call get_string_with_prompt(pm_length_unit,
     1                 'Enter name of length unit ')
               real_vec(1) = pm_scale_plot2cm
               call get_reals_with_prompt(real_vec,1,
     1           'Conversion factor from this unit to centimeters')
               if( real_vec(1) .le. 0.0 ) then
                  call display_message('Invalid scale factor')
               else
                  pm_scale_plot2cm = real_vec(1)
                  pm_scale_cm2plot = 1.0/real_vec(1)
               endif
               call display_string(6 ,42,pm_length_unit,20,1)
            else if( item_number .eq. 6 ) then
               if( l_autoscale ) then
                  l_autoscale = .FALSE.
                  chdum4 = 'no'
               else
                   l_autoscale = .TRUE.
                  chdum4 = 'yes'
               endif
               call display_string(7 ,42,chdum4,3,1)
            else if( item_number .eq. 7 ) then
               real_vec(1) = global_text_scale
               call get_reals_with_prompt(real_vec,1,
     1           'Text scale factor: (1.0 == default text size)')
               global_text_scale = real_vec(1)
               global_text_scale = MAX(global_text_scale,0.1)
               call display_real  (8 ,38,global_text_scale,1)
            else if( item_number .eq. 8 ) then
               call pm_reset_colornames
               call display_message_quietly('Colors reset to defaults')
            else if( item_number .eq. 9 ) then
               call get_string_with_prompt(tempfont,
     1         'Enter PostScript font name (enter ? for list of fonts)')
               if( tempfont .eq. '?' ) then
c                 Display all fonts and then repaint screen
                  call pm_display_ps_fonts
                  reuse_last_input = .TRUE.
                  goto 100
               endif
               idum = pm_decode_psfont(tempfont)
               if( idum .eq. 0 ) then
                  call display_message('Invalid font name')
               else
                  psfont = tempfont
                  ps_font_id = idum
                  call display_string(10,42,psfont,25,1)
               endif
            else if( item_number .eq. 10 ) then
               call get_string_with_prompt(units_delim,
     1            'Enter units delimiters, e.g. () or []')
               left_unit_delim  = units_delim(1:1)
               right_unit_delim = units_delim(2:2)
               call display_string(11,42,units_delim,2,1)
            endif
         endif
      endif
      goto 200
c
1000  call display_message('Illegal input')
      goto 200
c
300   continue
c
      return
      end
c
      subroutine read_defaults
      implicit none
c
c     Read POSTMINI default parameters from the startup file
c
      include 'const.h'
      include 'sysdep.cmn'
      include 'plot.cmn'
      include 'units.cmn'
      include 'defaults.cmn'
      include 'io.cmn'
c
      real real_vec(5)
      integer ilen, ilen2, ipos, ibuf, iline, klen, string_len,
     1        color_index, int_vec(3), ioerr, nrecl,
     2        ierr, pm_color_to_rgb,
     2        pm_decode_psfont
      logical err
      character*80 key, item
c     Any more than 131 characters overflows output record under VMS
c     when printed to screen (sigh)
      character*131 default_file, buffer
c
      err = .FALSE.
      iline = 0
      ibuf = LEN(buffer)
c
c     Try to open defaults file in current directory
c
      default_file = PM_STARTUP_FILE
      nrecl=0
      call pm_open_file(15, default_file,
     1                  'OLD','FORMATTED','READ','LIST',
     2                  'NONSHARED',nrecl,ioerr,ierr)
      if( ierr .ne. 0 ) then
c        Open failed in current directory, so try in home directory
         call get_homedir(default_file)
         ilen = string_len(default_file)
         default_file = default_file(1:ilen) // PM_STARTUP_FILE
         nrecl=0
         call pm_open_file(15, default_file,
     1                  'OLD','FORMATTED','READ','LIST',
     2                  'NONSHARED',nrecl,ioerr,ierr)
         if( ierr .ne. 0 ) goto 3000
      endif
c
c     OK, file is opened, tell user we're reading it...
      ilen = string_len(default_file)
      write(luttyo,2001) default_file(1:ilen)
2001  format(' ','Reading Postmini defaults from file:'/' ',a)
c
2100  read(15,2002,end=2500) buffer
2002  format(a)
      iline = iline + 1
      ipos = 1
c     Check for comment line
      if( buffer(1:1) .eq. '!' ) goto 2100
c
c     Decode keyword
      call get_keyword(buffer,key,ipos)
c     Check for blank input line
      if( ipos .eq. 0 ) goto 2100
      call upcase(key)
      klen = string_len(key)
c     HARDCOPY = {string}
      if( key .eq. 'HARDCOPY' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         call dequote_string(item,ierr)
         if( ierr .ne. 0 ) goto 2200
         default_hc_name = item
c     HC_ORIENTATION = {landscape, portrait}
      else if( key .eq. 'HC_ORIENTATION' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         call dequote_string(item,ierr)
         if( ierr .ne. 0 ) goto 2200
         call upcase(item)
         if( item(1:1) .eq. 'P' ) then
            hc_is_landscape = .FALSE.
         else
            hc_is_landscape = .TRUE.
         endif
c     HIDDEN_LINE_METHOD = {device_dependent, color_bands,
c                           hidden_line, histogram}
      else if( key .eq. 'HIDDEN_LINE_METHOD' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         call dequote_string(item,ierr)
         if( ierr .ne. 0 ) goto 2200
         call upcase(item)
         if( item(1:1) .eq. 'C' ) then
            default_hidden_method = HIDDEN_LINES_WITH_FILL_AREA
         else if( item(1:3) .eq. 'HID' ) then
            default_hidden_method = HIDDEN_LINES_WITH_HORIZON_FCN
         else if( item(1:3) .eq. 'HIS' ) then
            default_hidden_method = HIDDEN_LINES_HISTOGRAM
         else
            default_hidden_method = 0
         endif
c     PLOT_SCALE_FACTOR = {real}
      else if( key .eq. 'PLOT_SCALE_FACTOR' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         plot_scale_factor = MAX(MIN(real_vec(1),1.0),0.1)
c     LENGTH_UNIT_NAME_AND_SCALE = {nonblank_string,  real}
      else if( key .eq. 'LENGTH_UNIT_NAME_AND_SCALE' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         call dequote_string(item,ierr)
         if( ierr .ne. 0 ) goto 2200
         pm_length_unit = item
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         pm_scale_plot2cm = MAX(0.0,real_vec(1))
c     HC_SCALE_FACTOR = {real}
      else if( key .eq. 'HC_SCALE_FACTOR' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         hc_scale = MAX(MIN(real_vec(1),1.0),0.1)
c     LINEWIDTH_SCALE = {real}
      else if( key .eq. 'LINEWIDTH_SCALE' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         global_linewidth_scale = MAX(MIN(real_vec(1),5.0),0.1)
c     3D_VIEW = {real real real}
      else if( key .eq. '3D_VIEW' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) threed_view(1)
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) threed_view(2)
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) threed_view(3)
         l_threed_view = .TRUE.
c     X_AXIS_LABEL = {string}
      else if( key .eq. 'X_AXIS_LABEL' ) then
         call get_str_start(buffer,ipos)
         if( ipos .eq. 0 ) goto 2200
         x_axis_label = buffer(ipos:ibuf)
         call dequote_string(x_axis_label,ierr)
         if( ierr .ne. 0 ) goto 2200
         l_x_axis_label = .TRUE.
c     X_AXIS_MINIMUM = {real}
      else if( key .eq. 'X_AXIS_MINIMUM' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         x_axis_min = real_vec(1)
         l_x_axis_min = .TRUE.
c     X_AXIS_MAXIMUM = {real}
      else if( key .eq. 'X_AXIS_MAXIMUM' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         x_axis_max = real_vec(1)
         l_x_axis_max = .TRUE.
c     Y_AXIS_LABEL = {string}
      else if( key .eq. 'Y_AXIS_LABEL' ) then
         call get_str_start(buffer,ipos)
         if( ipos .eq. 0 ) goto 2200
         y_axis_label = buffer(ipos:ibuf)
         call dequote_string(y_axis_label,ierr)
         if( ierr .ne. 0 ) goto 2200
         l_y_axis_label = .TRUE.
c     Y_AXIS_MINIMUM = {real}
      else if( key .eq. 'Y_AXIS_MINIMUM' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         y_axis_min = real_vec(1)
         l_y_axis_min = .TRUE.
c     Y_AXIS_MAXIMUM = {real}
      else if( key .eq. 'Y_AXIS_MAXIMUM' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         y_axis_max = real_vec(1)
         l_y_axis_max = .TRUE.
c     Z_AXIS_LABEL = {string}
      else if( key .eq. 'Z_AXIS_LABEL' ) then
         call get_str_start(buffer,ipos)
         if( ipos .eq. 0 ) goto 2200
         z_axis_label = buffer(ipos:ibuf)
         call dequote_string(z_axis_label,ierr)
         if( ierr .ne. 0 ) goto 2200
         l_z_axis_label = .TRUE.
c     Z_AXIS_MINIMUM = {real}
      else if( key .eq. 'Z_AXIS_MINIMUM' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         z_axis_min = real_vec(1)
         l_z_axis_min = .TRUE.
c     Z_AXIS_MAXIMUM = {real}
      else if( key .eq. 'Z_AXIS_MAXIMUM' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         z_axis_max = real_vec(1)
         l_z_axis_max = .TRUE.
c     Z_COLORMAP_MAXIMUM = {real}
      else if( key .eq. 'Z_COLORMAP_MAXIMUM' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         z_colormap_max = real_vec(1)
         l_z_colormap_max = .TRUE.
c     Z_COLORMAP_MINIMUM = {real}
      else if( key .eq. 'Z_COLORMAP_MINIMUM' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         z_colormap_min = real_vec(1)
         l_z_colormap_min = .TRUE.
c     SOLID_CONTOUR_LINES
      else if( key .eq. 'SOLID_CONTOUR_LINES' ) then
         use_solid_lines = .TRUE.
c     COLOR_nn = {real real real}
      else if( key(1:6) .eq. 'COLOR_' .and.
     1         (klen .eq. 7 .or. klen .eq. 8) ) then
         read(key(7:klen),2110,end=2300,err=2300) color_index
2110     format(i2)
         if( color_index .gt. MAX_RGB_VALUES .or.
     1       color_index .lt. 0 ) goto 2300
c        First, look for named color
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         call lowercase(item)
         ierr = pm_color_to_rgb(item,
     1        rgb(color_index,1),rgb(color_index,2),rgb(color_index,3))
c        If error, look for RGB numeric values
         if( ierr .eq. 0 ) then
c           Known color, store name so we can reference it later
            color_names(color_index) = item
         else
            read(item,*,end=2200,err=2200) rgb(color_index,1)
            call get_keyword(buffer,item,ipos)
            if( ipos .eq. 0 ) goto 2200
            read(item,*,end=2200,err=2200) rgb(color_index,2)
            call get_keyword(buffer,item,ipos)
            if( ipos .eq. 0 ) goto 2200
            read(item,*,end=2200,err=2200) rgb(color_index,3)
            l_rgb(color_index) = .TRUE.
c           Store name so we can reference it later
            if( color_index .lt. 10 ) then
               write(color_names(color_index),100) color_index
100            format('userdefined',i1)
            else
               write(color_names(color_index),101) color_index
101            format('userdefined',i2)
            endif
         endif
c     PS_FONT_ID = {int}
c     Changes font used by GKS for all PostScript devices
      else if( key .eq. 'PS_FONT_ID' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         int_vec(1) = pm_decode_psfont(item)
         if( int_vec(1) .eq. 0 )
     1      read(item,*,end=2200,err=2200) int_vec(1)
         ps_font_id = int_vec(1)
c     FONT_ID = {int}
c     Changes font used by GKS for all devices except VTxxx and PostScript
c     VTxxx use hardware fonts for speed and legibility.
      else if( key .eq. 'FONT_ID' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) int_vec(1)
         default_font_id = int_vec(1)
c     AUTOSCALE
      else if( key .eq. 'AUTOSCALE' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) then
            l_autoscale = .TRUE.
         else
            call upcase(item)
            if( item(1:1) .eq. 'Y' ) then
               l_autoscale = .TRUE.
            else
               l_autoscale = .FALSE.
            endif
         endif
c     WRITE_PMIFILE
      else if( key .eq. 'WRITE_PMIFILE' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) then
            l_write_pmifile = .TRUE.
         else
            call upcase(item)
            if( item(1:1) .eq. 'Y' ) then
               l_write_pmifile = .TRUE.
            else
               l_write_pmifile = .FALSE.
            endif
         endif
c     OXIDE_FILL
      else if( key .eq. 'OXIDE_FILL' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) then
            l_oxide_fill = .TRUE.
         else
            call upcase(item)
            if( item(1:1) .eq. 'N' ) then
               l_oxide_fill = .FALSE.
            else
               l_oxide_fill = .TRUE.
            endif
         endif
c     TEXT_SCALE = {real}
      else if( key .eq. 'TEXT_SCALE' ) then
         call get_keyword(buffer,item,ipos)
         if( ipos .eq. 0 ) goto 2200
         read(item,*,end=2200,err=2200) real_vec(1)
         if( real_vec(1) .le. 0.1 ) goto 2200
         global_text_scale = real_vec(1)
      else
         ilen = string_len(key)
         ilen2 = string_len(buffer)
         write(luttyo,2003) iline, key(1:ilen), buffer(1:ilen2)
2003     format(' ','Error on line ',i5,': Unrecognized keyword: ',a/
     1          ' ',a)
         err = .TRUE.
      endif
c
c     Read next line
      goto 2100
c
c     Error on read of values
2200  if( ipos .eq. 0 ) then
         ilen = string_len(buffer)
         write(luttyo,2201) iline, buffer(1:ilen)
2201     format(' ','Error on line ',i5,
     1          ': Insufficient number of value(s)'/
     1          ' ',a)
      else
         ilen = string_len(item) 
         ilen2 = string_len(buffer)
         write(luttyo,2202) iline, item(1:ilen), buffer(1:ilen2)
2202     format(' ','Error on line ',i5,': Illegal value: ',a/' ',a)
      endif
      err = .TRUE.
      goto 2100
c
c     Error on (sub)parse of key
2300  ilen = string_len(key) 
      ilen2 = string_len(buffer)
      write(luttyo,2301) iline, key(1:ilen), buffer(1:ilen2)
2301  format(' ','Error on line ',i5,': Illegal key: ',a/' ',a)
      err = .TRUE.
      goto 2100
c
2500  close(unit=15)
      if( err ) then
         write(luttyo,2501)
2501     format(' ','Hit return to continue...')
         read(luttyi,*)
      endif
c
3000  continue
      return
      end
c
      subroutine pm_display_ps_fonts
      implicit none
c
      character*1 ch
c
      call clear_screen
      call display_string(2 ,1 ,'times_roman',11,0)
      call display_string(3 ,1 ,'times_italic',12,0)
      call display_string(4 ,1 ,'times_bold',10,0)
      call display_string(5 ,1 ,'times_bold_italic',17,0)
      call display_string(6 ,1 ,'helvetica',9,0)
      call display_string(7 ,1 ,'helvetica_oblique',17,0)
      call display_string(8 ,1 ,'helvetica_bold',14,0)
      call display_string(9 ,1 ,'helvetica_bold_oblique',23,0)
      call display_string(10,1 ,'courier',7,0)
      call display_string(11,1 ,'courier_oblique',15,0)
      call display_string(12,1 ,'courier_bold',12,0)
      call display_string(13,1 ,'courier_bold_oblique',20,0)
c
      call get_string_with_prompt(ch,'Press return to continue...')
c
      return
      end

