This file is indexed.

/usr/share/elmerpost/tcl/saveimage.tcl is in elmer-common 6.1.0.svn.5396.dfsg2-4ubuntu1.

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
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#/*****************************************************************************
# *
# *  Elmer, A Finite Element Software for Multiphysical Problems
# *
# *  Copyright 1st April 1995 - , CSC - IT Center for Science Ltd., Finland
# * 
# *  This program is free software; you can redistribute it and/or
# *  modify it under the terms of the GNU General Public License
# *  as published by the Free Software Foundation; either version 2
# *  of the License, or (at your option) any later version.
# * 
# *  This program is distributed in the hope that it will be useful,
# *  but WITHOUT ANY WARRANTY; without even the implied warranty of
# *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# *  GNU General Public License for more details.
# *
# *  You should have received a copy of the GNU General Public License
# *  along with this program (in file fem/GPL-2); if not, write to the 
# *  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
# *  Boston, MA 02110-1301, USA.
# *
# *****************************************************************************/
#*******************************************************************************

#*******************************************************************************
#*
#*     Model file read utility routines
#*
#*******************************************************************************
#*
#*                     Author:       Juha Ruokolainen
#*
#*                    Address: CSC - IT Center for Science Ltd.
#*                                Keilaranta 14, P.O. BOX 405
#*                                  02101 Espoo, Finland
#*                                  Tel. +358 0 457 2723
#*                                Telefax: +358 0 457 2302
#*                              EMail: Juha.Ruokolainen@csc.fi
#*
#*                       Date: 26 Sep 1995
#*
#*                Modified by:
#*
#*       Date of modification:
#*
#*******************************************************************************

set OUTPS      0
set PSFileName ""

proc saveimage { File outps }   {
  global GlobalOptions PSFileName

  if { $outps == 1 } {
      puts "ps"
      set PSFileName $File
      set GlobalOptions(OutputPS) 1
      display
      set GlobalOptions(OutputPS) 0
      display
  } else {
      if { $outps == 0 } {
	  puts "ppm"
	  screensave $File
      } else {
	  puts "jpg"
	  savejpg $File
      }
  }
}


proc SaveImage {} {
    global PSFileName OutputPS OUTPS

    set w .screensave

    if { [winfo exists $w] } {
      wm iconify $w
      wm deiconify $w
      return
    } else {
      toplevel $w
      place_window $w
      wm title $w "Save Screen"
    }

#
# File name
#
    label $w.sp1 -text "Save as:"
    radiobutton $w.rb2 -value 0 -variable "OUTPS" -text "PPM Image"
    checkbutton $w.rb3  -variable "GlobalOptions(FitToPagePS)" -text "Fit PS to page"
    radiobutton $w.rb1 -value 1 -variable "OUTPS" -text "Postscript"
    radiobutton $w.rb4 -value 2 -variable "OUTPS" -text "JPG Image"
    pack $w.sp1 $w.rb1 $w.rb3 $w.rb2 $w.rb4

#    pack $w.rb3 -side top

    label $w.sp3 -text "\nSelect file:\n" -font "Helvetica-Bold 12"
    pack $w.sp3 -side top

    frame $w.file -relief sunken
    label $w.file.lab -text "File Name: "
    entry $w.file.name -width 40 -textvariable PSFileName

    button $w.file.but -text "Browse..." -command \
       { set PSFileName [tk_getSaveFile -parent .screensave -title "Save Image To File"]; }

    pack $w.file.lab $w.file.name $w.file.but -side left
    pack $w.file -side top

    label $w.sp4 -text \n
    pack $w.sp4 -side top

    frame $w.but
    button  $w.but.exit -text "Close" -command "destroy $w"
    button  $w.but.save -text "Save" -command { saveimage $PSFileName $OUTPS }

    pack $w.but $w.but.exit $w.but.save -side right
}