This file is indexed.

/usr/share/tau/tools/inc/bdbm.tcl is in tau-racy 2.17.3.1.dfsg-4.2.

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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
###########################################################################
# TAU Browser Databse Manager (BDBM)
#
# This is a TAU tool that runs invisibly in the TAU environment to server
# certain requests for browser information.  This code must be sourced 
# from a TAU tool skeleton (generated from tool.skel).
#
# Kurt Windisch (kurtw@cs.uoregon.edu) - 4/25/96
###########################################################################


###########################################################################
# Data Structures
#
#
# BDB_projname -> string containing name of project
#
# BDB_host -> sting containing the host computer name or "localhost"
#
# BDB_names(<progfile>,<name>) -> list of {<tag> <filen> <line> <mangledname>}
#                                 for files defining the function <name>.
#
# BDB_classes(<progfile>,<class>) -> list of {<tag> <filen> <line> for files
#                                    defining the class <class>.
#
# BDB_progfile_headers(<progfile>) -> list of header files included by
#                                     <progfile>
#
# BDB_progfiles_comptime(<progfile>) -> currently either "compiled" or
#                                       "uncompiled" for remote usage
#
# BDB_maintag -> {<depfilename> <tag>}
#
###########################################################################

set DEBUG_SET 0
proc DEBUG {} {
  global DEBUG_SET ; return $DEBUG_SET
}

###########################################################################
# Accessor Procedures
#


proc Bdb__GetFuncs {{filen ""}} {
    global BDB_names

    set retlist [list]
    if {$filen == ""} {
	foreach entry [array names BDB_names] {
	    set tmplist [split $entry ","]
	    set name [lindex $tmplist 1]
	    set progfile [lindex $tmplist 0]

	    foreach c $BDB_names($entry) {
		lappend retlist [list $name $progfile [lindex $c 0]]
	    }
	}
    } else {
	foreach entry [array names BDB_names "$filen,*"] {
	    set tmplist [split $entry ","]
	    set name [lindex $tmplist 1]
	    set progfile [lindex $tmplist 0]

	    foreach c $BDB_names($entry) {
		lappend retlist [list $name $progfile [lindex $c 0]]
	    }
	}
    }

    return $retlist
}


proc Bdb__GetClasses {{filen ""}} {
    global BDB_classes

    set retlist [list]
    if {$filen == ""} {
	foreach entry [array names BDB_classes] {
	    set tmplist [split $entry ","]
	    set name [lindex $tmplist 1]
	    set progfile [lindex $tmplist 0]

	    foreach c $BDB_classes($entry) {
		set deffile [lindex $c 1]
		set defline [lindex $c 3]
		if {![info exists \
			__tmp__unique_classes($name,$deffile,$defline)]} {
		    set __tmp__unique_classes($name,$deffile,$defline) 1
		    lappend retlist [list $name $progfile [lindex $c 0]]
		}
	    }
	}
    } else {
	foreach entry [array names BDB_classes "$filen,*"] {
	    set tmplist [split $entry ","]
	    set name [lindex $tmplist 1]
	    set progfile [lindex $tmplist 0]

	    foreach c $BDB_classes($entry) {
		lappend retlist [list $name $progfile [lindex $c 0]]
	    }
	}
    }

    return $retlist
}


proc Bdb__GetHeaders {{filen ""}} {
    global BDB_progfile_headers

    set sets [list]
    if [info exists BDB_progfile_headers] {
	foreach n [array names BDB_progfile_headers] {
	    set sets [concat $sets $BDB_progfile_headers($n)]
	}
    }
    set headers [eval lunion $sets]
    return $headers
}


# returns a list of {<file> <tag> <line> <def-file> <name>} for <file>s that 
# contain definitions for function <func>.
proc Bdb__LookupFuncTag {progfile tag} {
    global BDB_names

    set retlist [list]
    foreach entry [array names BDB_names "$progfile,*"] {
	set func [string range $entry \
		[expr [string first "," $entry] + 1] end]
	foreach elem $BDB_names($entry) {

	    if {[lindex $elem 0] == $tag} {
		set deffile [lindex $elem 1]
		set defline [lindex $elem 2]
		return [list \
			$progfile [lindex $elem 0] $defline $deffile $func]
	    }
	}
    }
    return BDBM_FAILED
}

# returns a list of {<file> <tag> <line> <def-file> <name>} for <file>s that 
# contain definitions for class.
proc Bdb__LookupClassTag {progfile tag} {
    global BDB_classes

    set retlist [list]
    foreach entry [array names BDB_classes "$progfile,*"] {
	set class [string range $entry \
		[expr [string first "," $entry] + 1] end]
	foreach elem $BDB_classes($entry) {

	    if {[lindex $elem 0] == $tag} {
		set deffile [lindex $elem 1]
		set defline [lindex $elem 2]
		return [list \
			$progfile [lindex $elem 0] $defline $deffile $class]
	    }
	}
    }
    return BDBM_FAILED
}

# returns a list of {<file> <tag> <line> <def-file> <name>} for <file>s that 
# contain definitions for function <func>.
proc Bdb__LookupFunc {func} {
    global BDB_names

    set retlist [list]
    foreach entry [array names BDB_names "*,$func"] {
	set filen [string range $entry 0 [expr [string first "," $entry] - 1]]
	foreach elem $BDB_names($entry) {
	    set deffile [lindex $elem 1]
	    set defline [lindex $elem 2]
	    if {![info exists __tmp__instances($deffile,$defline)]} {
		lappend retlist \
			[list $filen [lindex $elem 0] $defline $deffile $func]
		set __tmp__instances($deffile,$defline) 1
	    }
	}
    }
    return $retlist
}


# returns a list of {<file> <tag> <line> <def-file> <name>} for <file>s that 
# contain definitions for class <class>.
proc Bdb__LookupClass {class} {
    global BDB_classes

    set retlist [list]
    foreach entry [array names BDB_classes "*,$class"] {
	set filen [string range $entry 0 [expr [string first "," $entry] - 1]]
	foreach elem $BDB_classes($entry) {
	    set deffile [lindex $elem 1]
	    set defline [lindex $elem 2]
	    if {![info exists __tmp__instances($deffile,$defline)]} {
		lappend retlist \
			[list $filen [lindex $elem 0] $defline $deffile $class]
		set __tmp__instances($deffile,$defline) 1
	    }
	}
    }
    return $retlist
}

# Merges LookupFunc and LookupClass, returning an additional <type>.
proc Bdb__LookupName {name} {
    global BDB_names BDB_classes

    set retlist [list]

    # Look for funcs
    foreach entry [array names BDB_names "*,$func"] {
	set filen [string range $entry 0 [expr [string first "," $entry] - 1]]
	foreach elem $BDB_names($entry) {
	    set deffile [lindex $elem 1]
	    set defline [lindex $elem 2]
	    if {![info exists __tmp__instances($deffile,$defline)]} {
		lappend retlist \
			[list $filen [lindex $elem 0] $defline $deffine \
			$name FUNC]
		set __tmp__instances($deffile,$defline) 1
	    }
	}
    }

    # Look for classes
    foreach entry [array names BDB_classes "*,$class"] {
	set filen [string range $entry 0 [expr [string first "," $entry] - 1]]
	foreach elem $BDB_classes($entry) {
	    set deffile [lindex $elem 1]
	    set defline [lindex $elem 2]
	    if {![info exists __tmp__instances($deffile,$defline)]} {
		lappend retlist \
			[list $filen [lindex $elem 0] $defline $deffile CLASS]
		set __tmp__instances($deffile,$defline) 1
	    }
	}
    }

    return $retlist
}



# NOT YET USED - NOT IN INTERFACE
# returns a list of function names defined in <file> if <file> is specified,
# or for the entire application if <file> is unspecified.
proc Bdb__GetNames {{filen "-"}} {

    global BDB_names

    set retlist [list]
    if {$filen == "-"} {
	foreach entry [array names BDB_names] {
	    lappend retlist [string range $entry\
		    [expr 1 + [string last "," $entry]] end]
	}
    } else {
	foreach entry [array names BDB_names "$filen,*"] {
	    lappend retlist [string range $entry \
		    [expr 1 + [string last "," $entry]] end]
	}
    }

    return $retlist
}

# returns {<file> <tag>} specifying the depfile and tag containing the
# applications Main function, or 0 if Main is not defined in the BDB
proc Bdb__GetMaintag {} {
    global BDB_maintag

    if {[info exists BDB_maintag]} {
	return $BDB_maintag
    } else {
	return 0
    }
}

# returns the unique {<progfile> <tag>} for the definition of a given function
# returns an empty list if not definition is found
proc Bdb__FindFuncDefByName {name sig} {
    global BDB_names
    set candidates [Bdb__LookupFunc $name]
    foreach c $candidates {
	set cprogfile [lindex $c 0]
	if {![info exists __tmp__searched($cprogfile)]} {
	    set __tmp_searched($cprogfile) 1
	    foreach m $BDB_names($cprogfile,$name) {   ;# foreach match
	        set mtag [lindex $m 0]
	        if {[llength $m] >= 4} {  ;# mangled name info available
	            if { [string match [lindex $m 3] \
		                       $sig]} {
                        return [list $cprogfile $mtag]
	            }
		}
	    }
	}
    }
    
    return [list]
} 

    
# 
# End of Accessor Procedures
###########################################################################



###########################################################################
# Database Manipulation Procedures
#    

# Adds an uncompiled program file to the database - Must be called before
# calling BDB__Compile.
proc Bdb__Add {file} {
    global BDB_names BDB_progfile_headers \
	    BDB_progfiles_comptime BDB_classes
    
    if {[info exists BDB_progfiles_comptime($file)]} {
	puts "Error: Adding a file twice is illegal."
	return
    }

    set BDB_progfile_headers($file) [list]
    set BDB_progfiles_comptime($file) "uncompiled"
}
    

# Removes all traces of a program file from the database if <what> is
# "removing" or unspecified) or removes just names, classes, progfile_headers
# if <what> is "compiling".
proc Bdb__Remove {filen {what removing}} {
    global BDB_names BDB_progfile_headers \
	    BDB_progfiles_comptime BDB_classes BDB_maintag

    foreach entry [array names BDB_names "$filen,*"] {
	unset BDB_names($entry)
    }
    foreach entry [array names BDB_classes "$filen,*"] {
	unset BDB_classes($entry)
    }
    if {[info exists BDB_progfile_headers($filen)]} {
	unset BDB_progfile_headers($filen)
    }

    if {[info exists BDB_maintag] && ([lindex $BDB_maintag 0] == $filen)} {
	unset BDB_maintag
    }

    if {$what != "compiling"} {
	if {[info exists BDB_progfiles_comptime($filen)]} {
	    unset BDB_progfiles_comptime($filen)
	}
    }
}


# Compiles database info for the given program file, first removing old info
# if it is already in the DB.
proc Bdb__Compile {filen} {
    global BDB_names BDB_progfile_headers \
	    BDB_progfiles_comptime BDB_classes BDB_maintag \
	    depfile REMSH BINDIR BDB_host BDB_projname
    
    if {[info exists BDB_progfiles_comptime($filen)]} {
	if {$BDB_progfiles_comptime($filen) != "uncompiled"} {
	    Bdb__Remove $filen compiling
	}
    } else {
	puts "Browser Database Manager Error: attemped to compile file"
	puts "  ($file) that has not been added to the database."
	return
    }

    set lang [PM__SetLangOption $filen]
    set cgm [Lang_GetCGM $lang]
    set cgmfile [Bdb__cgmfile $filen]
    if {[string index $cgmfile 0] != "/"} {
	set dirn [file dirname $BDB_projname]
	set cgmfile "$dirn/$cgmfile"
    }

    if {![FileIO_file_exists $BDB_host $cgmfile]} {
	return
    }

    if {$BDB_host == "localhost"} {
	set oldcd [pwd]
	cd $depfile(dir)
	set in [open "| $BINDIR/$cgm -dumpbdb $cgmfile" r]
    } else {
	set REMBINDIR "$depfile(root)/bin/$depfile(arch)"
	set in [open "|$REMSH $BDB_host \
		-n \"$REMBINDIR/$cgm -dumpbdb $cgmfile\"" r]
    }
    while {![eof $in]} {
	gets $in ln

	# treat it as a list so that quotes are handled right
	if {[llength $ln] > 0} {
	    set com  [lindex $ln 0]
	    set arg1 [lindex $ln 1]
	    set arg2 [lindex $ln 2]
	    if {[llength $ln] >= 4} {
		set arg3 [lindex $ln 3]
	    } else {
		set arg3 "-"
	    }
	    
	switch $com {
	    ftag:   { ;# -- tag: <tag> <name> <signature>
	    set tag $arg1
	    set name $arg2
	    set sig $arg3
	    }

	    ffile:  { ;# -- file: <line|0> <file|-> @ <position>
	    if {$arg2 != "-"} {
		set BDB_names($filen,$name) \
			[lappend BDB_names($filen,$name) \
			[list $tag $arg2 $arg1 $sig]]

		if {$filen != $arg2} {
		    if {![info exists __tmp__headers($arg2)]} {
			set BDB_progfile_headers($filen) \
				[lappend BDB_progfile_headers($filen) $arg2]
			set __tmp__headers($arg2) 1
		    }
		}
	    }
	    }
	    
	    ftype: { # -- type: <par|seq> <type> <used|not>
	    if {$arg2 == "Main"} {
		set BDB_maintag [list $filen $tag]
	    }
	    }

	    ctag:   { ;# -- tag: <tag> <name> <COLL|->
	    set tag $arg1
	    set name $arg2
	    }

	    cfile:  { # -- file: <line|0> <file|-> @ <position>
	    if {$arg2 != "-"} {
		set BDB_classes($filen,$name) \
			[lappend BDB_classes($filen,$name) \
			[list $tag $arg2 $arg1]]

		if {$filen != $arg2} {
		    if {![info exists __tmp__headers($arg2)]} {
			set BDB_progfile_headers($filen) \
				[lappend BDB_progfile_headers($filen) $arg2]
			set __tmp__headers($arg2) 1
		    }
		}
	    }
	    }
	} ;# switch
    set com ""; set ln ""
    } ;# if items
    } ;# while
    if [catch {close $in} errmsg] {
	showError "Error obtaining browing info: `$errmsg'."
	if { ! [regexp -nocase "warning" $errmsg] } {
	    return NOT_OK
	}
    }

    if {$BDB_host == "localhost"} {
	set BDB_progfiles_comptime($filen) [file atime $cgmfile]
    } else {
	set BDB_progfiles_comptime($filen) "compiled"
    }
}


proc Bdb__SaveDB {} {
    global BDB_names BDB_progfile_headers BDB_host \
	    BDB_progfiles_comptime BDB_classes BDB_maintag BDB_projname \
	    depfile FileIO_Error

    if [DEBUG] { puts "SaveDB:"}

    if {![info exists BDB_projname]} { return; }

    set outfile [FileIO_file_open $BDB_host "$BDB_projname.bdb" w]
    if {$outfile == "FILEIO_ERROR"} {
	showError "Error opening browser info file: $FileIO_Error"
	return
    }

    if [DEBUG] { puts "saving progfiles_comptime"}
    foreach entry [array names BDB_progfiles_comptime] {
	puts $outfile [format "set BDB_progfiles_comptime(%s) %s" \
		$entry $BDB_progfiles_comptime($entry)]
    }

    if [DEBUG] { puts "saving progfile_headers"}
    foreach entry [array names BDB_progfile_headers] {
	puts $outfile [format "set BDB_progfile_headers(%s) \\{%s\\}" \
		$entry $BDB_progfile_headers($entry)]
    }

    if [DEBUG] { puts "saving names"}
    foreach entry [array names BDB_names] {
	regsub -all {\{} $BDB_names($entry) "\\\{" tmpout1
	regsub -all {\}} $tmpout1 "\\\}" tmpout2
	puts $outfile [format "set BDB_names(%s) \\{%s\\}" \
		$entry $tmpout2]
    }

    if [DEBUG] { puts "saving classes"}
    foreach entry [array names BDB_classes] {
	regsub -all {\{} $BDB_classes($entry) "\\\{" tmpout1
	regsub -all {\}} $tmpout1 "\\\}" tmpout2
	puts $outfile [format "set BDB_classes(%s) \\{%s\\}" \
		$entry $tmpout2]
    }

    if [DEBUG] { puts "saving maintag"}
    if {[info exists BDB_maintag]} {
	puts $outfile [format "set BDB_maintag \\{%s\\}" \
		$BDB_maintag]
    }

    flush $outfile
    FileIO_file_close $BDB_host $outfile
}


proc Bdb__LoadDB {} {
    global BDB_names BDB_progfile_headers BDB_host BDB_maintag \
	    BDB_progfiles_comptime BDB_classes BDB_projname \
	    depfile FileIO_Error

    if [DEBUG] { puts "LoadDB:"}
    
    set in [FileIO_file_open $BDB_host "$BDB_projname.bdb" r]
    if {$in == "FILEIO_ERROR"} {
	showError "Error opening browser info file: $FileIO_Error"
	return
    }

    while {[gets $in bdbinfo] >= 0} {
	if [DEBUG] {puts "reading: $bdbinfo"}
	catch "eval $bdbinfo" foo
        if [DEBUG] {puts "CATCH : $foo"}
    }

    #set bdbinfo [read $in]
    #if [DEBUG] { puts "reading $bdbinfo"}
    #catch "eval $bdbinfo" foo
    #puts "CATCH : $foo"

    set fresult [FileIO_file_close $BDB_host $in]

    if {$fresult == "FILEIO_ERROR"} {
	showError "Error opening browser info file ($BDB_projname.bdb): \
		$FileIO_Error"
	return
    }
}

#
# End of Database Manipulation Procedures
###########################################################################


###########################################################################
# Utility Procedures
#

proc Bdb__remove_elements {l filen} {
    set result [list]
    foreach elem $l {
	if {[lindex $elem 0] != $filen} {
	    lappend result $elem
	}
    }
    return $result
}   

proc Bdb__cgmfile {progfile} {
    set lang [PM__SetLangOption $progfile]
    set ext [Lang_GetExt $lang]
    return  [format "%s.%s" [file rootname $progfile] $ext]
}

#
# End Utility Procedures
###########################################################################



###########################################################################
#
# Main Program
#
# BDBM is called with a project name and a list of program files as parameters.
#

proc Bdb__Init {projname host projdir file_list} {
    global BDB_projname BDB_host BDB_progfiles_comptime
    global depfile

    set BDB_projname "$projdir/$projname"
    set BDB_host $host
    
    # If a browser database exists, load it and check file dates to see 
    # if current
    if [FileIO_file_exists $BDB_host "$projdir/$projname.bdb"] {
	
	# Load and update the database
	if [DEBUG] { puts "bdb files exists --> Bdb__LoadDB" }
	Bdb__LoadDB
	if [DEBUG] { puts "...done with Bdb__LoadDB" }
	
	# Check if specified files are in BDB and their indices built
	foreach progfile $file_list {
	    if {![info exists BDB_progfiles_comptime($progfile)]} {
		if [DEBUG] { puts "$progfile not in bdb - building index" }
		Bdb__Add $progfile
		Bdb__Compile $progfile
	    } elseif {$BDB_host == "localhost"} {
		# take adavange of local timestamps 
		if {($BDB_progfiles_comptime($progfile) != "uncompiled") \
			&& ($BDB_progfiles_comptime($progfile) < \
			[file mtime [Bdb__cgmfile $progfile]])} {
		    if [DEBUG] { puts "$progfile out of date, building index" }
		    Bdb__Compile $progfile
		}
	    } else {
		# don't have timestamps (since remote) - just compile it
		if [DEBUG] { puts "$progfile remote - build index to be safe" }
		Bdb__Compile $progfile
	    }
	}
    
	foreach progfile [array names BDB_progfiles_comptime] {
	    # check if $progfile is in $file_list.  If not, remove from BDB
	    if {[lsearch -exact $file_list $progfile] == -1} {
		Bdb__Remove $progfile
	    }
	}

    } else {
	# Create a database from scratch
	foreach progfile $file_list {
	    if [DEBUG] { puts "create a new database for $progfile" }
	    Bdb__Add $progfile
	    Bdb__Compile $progfile
	}
    }
} 


proc Bdb_DeInit {} {
    global BDB_names BDB_progfile_headers BDB_host \
	    BDB_progfiles_comptime BDB_classes BDB_maintag BDB_projname

    if [DEBUG] { puts "Bdb_DeInit!"}
    Bdb__SaveDB 
    if {![info exists BDB_projname]} { return }
    unset BDB_projname
    if [info exists BDB_host] {
	unset BDB_host 
    }
    if [info exists BDB_names] {
	unset BDB_names
    }
    if [info exists BDB_classes] {
	unset BDB_classes
    }
    if [info exists BDB_progfile_headers] {
	unset BDB_progfile_headers
    }
    if [info exists BDB_progfiles_comptime] {
	unset BDB_progfiles_comptime
    }
    if [info exists BDB_maintag] {
	unset BDB_maintag
    }
}


proc Bdb__ChangeName {newname} {
    # This procedure changes the name of the current project, without changing
    # any of the current project files. For updating with a new .pmf file, with the
    # old file as a backup.
    
    global BDB_projname
    
    set statusTemp [PM__Status]
    if {[llength $statusTemp] <= 1} {
	showError "Unable to change project name:\nIncomplete status."
	return
    } else {
	set BDB_projname "[lindex $statusTemp 4]/[file rootname $newname]"
    }
}


#
# End of Program
###########################################################################