#usage "Edit next package
\n"
"Author: alf@cadsoft.de"
string cmd = "";
string pac[];
string edit = "";
int count = 0;
int n = 0;
if (library) library(L) {
L.packages(P) {
count++;
pac[count] = P.name;
cmd += P.name + "\n";
}
}
if (package) package(P) {
edit = P.name;
}
for (n = 1; n < count; n++) {
if (edit == pac[n]) {
// dlgMessageBox(dev[n+1], "+Ok", "-Cancel");
break;
}
}
if (n > 1) {
cmd = "EDIT " + pac[n - 1] + ".pac;\n" ;
// **************************************************
// a ";" must not follow DESCRIPT
// otherwise the description is overwritten
// with an empty string
// **************************************************
// dlgMessageBox(cmd, "+Ok", "-Cancel");
}
else
cmd = "EDIT " + pac[1] + ".pac;\n" ;
exit(cmd);