- Adding first working version of new AMOR settings module

- Improved sls magnet driver
This commit is contained in:
koennecke
2005-10-05 07:36:37 +00:00
parent c7280ec25d
commit 544dd37279
21 changed files with 2521 additions and 12 deletions

32
makedspcodes Executable file
View File

@ -0,0 +1,32 @@
#!/usr/bin/tclsh
#----- little script which converts ukas Tanners error code header file into a
#------ subroutine which converts into text
set f [open MessagesCodes.h r]
puts stdout "void slsdspCodeToText(int code, char *text, int textlen){"
puts stdout " switch(code){"
proc tokenize {txt} {
set l [split $txt]
foreach w $l {
if {[string length $w] > 1} {
lappend result $w
}
}
return $result
}
while {[gets $f line] >= 0} {
if {[string first "#define" $line] >= 0} {
set l [tokenize $line]
puts stdout " case [lindex $l 2]:"
puts stdout " strncpy(text,\"[lindex $l 1]\",textlen);"
puts stdout " break;"
}
}
puts stdout " }"
puts stdout "}"
close $f
exit 0