This file is indexed.

/usr/share/nrn/lib/hoc/mknrndll.hoc is in neuron 7.5-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
 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
xpanel("")
xbutton("nothing", "print 1")
xpanel(5000, 5000)

show_winio(0)

{load_file("stdlib.hoc", "String")}

objref rwl_, rwf_, sf_, tobj, box
objref ldfile
strdef tstr, rwdname, path

sprint(path, "%s", getcwd())
ldfile = new File()

sf_ = new StringFunctions()
if (unix_mac_pc() == 1) {
	rwdname = "$(HOME)/.NRNWorkingDirs"
}else{
	rwdname = "$(NEURONHOME)/RecentWorkingDirs"
}

proc filemenu() {
	box = new VBox()
	box.intercept(1)
	xpanel("")
	xmenu("Recent directories", "recent_working_dirs()")
	xmenu()
	xpanel()
	box.intercept(0)
}

proc doit() {local b
	filemenu()
	while (1) {
		index = -1
		b = box.dialog("Choose directory (containing .mod files) for creating nrnmech.dll", "Choose directory", "Quit")
		if (b == 0) { break }
		if (index != -1) {
			chdir(rwl_.object(index).s)
		}
		change_working_dir()
	}
	quit()
}

proc change_working_dir() {
	ldfile.chooser("d", "Directory", "", "Make nrnmech.dll", "Cancel", getcwd())
	if (ldfile.chooser()) {
		read_recent_working_dirs()
		if (change_working_dir1(ldfile.dir)) {
			exec()
		}
	}
}

func change_working_dir1() {
	if(chdir($s1) != 0) {
		sprint(tstr, "No such directory: %s", $s1)
		continue_dialog(tstr)
		return 0
	}
	sprint(path, "%s", getcwd())
	write_recent_working_dirs()
	return 1
}

proc read_recent_working_dirs() {local i
	rwf_ = new File()
	rwl_ = new List()
	if (rwf_.ropen(rwdname)) {
		while (!rwf_.eof()) {
			rwf_.gets(tstr)
			sf_.left(tstr, sf_.len(tstr) - 1)
			tobj = new String(tstr)
			rwl_.append(tobj)
		}
		rwf_.close()
	}
}

proc write_recent_working_dirs() {local i
	rwf_ = new File()
	if (rwf_.wopen(rwdname)) {
		rwf_.printf("%s\n", path)
		for i=0, rwl_.count-1 {
			if (strcmp(path, rwl_.object(i).s) != 0) {
				rwf_.printf("%s\n", rwl_.object(i).s)
				if (i > 10) break
			}
		}
		rwf_.close()
	}
}

proc recent_working_dirs() {local i
	read_recent_working_dirs()
	for i=0, rwl_.count-1 {
		//sprint(tstr, "change_working_dir2(%d)", i)
		sprint(tstr, "index=%d box.unmap(1)", i)
		xbutton(rwl_.object(i).s, tstr)
	}
}

proc exec() {localobj s1, s2
	chdir(path)
    if (sf_.substr(nrnversion(8), "mingw") > 0) {
	s1 = new String()
	s2 = new String()
	sscanf(neuronhome(), "%[^:]:%s", s1.s, s2.s)
	sprint(s1.s, "/%s%s", s1.s, s2.s)
	sprint(tstr, "%s/mingw/bin/sh %s/lib/mknrndll.sh %s", neuronhome(), neuronhome(), s1.s)
	print tstr
	system(tstr)
	quit()
    }else{
	sprint(tstr, "%s\\bin\\mintty -c %s/lib/minttyrc %s/bin/bash --rcfile %s/lib/nrnstart.bsh %s/lib/mknrndll.sh %s", neuronhome(1), neuronhome(), neuronhome(), neuronhome(), neuronhome(), neuronhome())
	print tstr
	WinExec(tstr)
	quit()
    }
}

doit()