1
0
Fork 0
This repository has been archived on 2019-12-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
arduinisten/eagle-5.7.0/ulp/ex-argv-path.ulp
Eve Entropia 157fd6f1a1 eagle
2010-03-30 20:14:34 +02:00

17 lines
451 B
Text

#usage "<b>Example: Usage of argv</b>\n"
"<p>"
"Returns the path of the ULP."
"<p>"
"<author>Author: support@cadsoft.de</author>"
// THIS PROGRAM IS PROVIDED AS IS AND WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR IMPLIED
void main(void) {
string ulp_path = "";
char c = '/';
int pos = strrchr(argv[0], c);
if (pos >= 0) {
ulp_path = strsub(argv[0], 0, pos + 1);
}
dlgMessageBox(ulp_path , "+OK");
}