This commit is contained in:
paolo.iocco
2023-03-09 10:24:21 +00:00
parent 1b2787b9ad
commit ab6f495c89
575 changed files with 173384 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
#usage "<b>Edit next device description</b>\n"
"<p>"
"<author>Author: support@cadsoft.de</author>"
// THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED
string cmd = "";
string dev[];
string edit = "";
int count = 0;
int n = 0;
if (library) library(L) {
L.devicesets(D) {
count++;
dev[count] = D.name;
cmd += D.name + "\n";
}
}
if (deviceset) deviceset(D) {
edit = D.name;
}
for (n = 1; n < count; n++) {
if (edit == dev[n]) {
break;
}
}
if (n < count) {
cmd = "EDIT " + dev[n + 1] + ".dev;\n DESCRIPT\n" ;
// **************************************************
// a ";" must not follow DESCRIPT
// otherwise the description is overwritten
// with an empty string
// **************************************************
}
else
cmd = "EDIT " + dev[1] + ".dev;\n DESCRIPT\n" ;
exit(cmd);