From 2359a05731e9a26d0b6d01cb34167506952611b5 Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Tue, 18 Jul 2017 17:07:55 -0400 Subject: [PATCH] fix "libdir" method for pdinfo --- pd/doc/5.reference/pdinfo-help.pd | 34 ++++++++++++++++--------------- pd/src/x_interface.c | 13 ++++-------- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/pd/doc/5.reference/pdinfo-help.pd b/pd/doc/5.reference/pdinfo-help.pd index dcb3cc7de..3cc5c2d3f 100644 --- a/pd/doc/5.reference/pdinfo-help.pd +++ b/pd/doc/5.reference/pdinfo-help.pd @@ -1,4 +1,4 @@ -#N canvas 0 19 555 619 10; +#N canvas 248 25 555 619 10; #X obj 0 595 cnv 15 552 21 empty \$0-pddp.cnv.footer empty 20 12 0 14 -228856 -66577 0; #X obj 0 0 cnv 15 552 40 empty \$0-pddp.cnv.header pdinfo 3 12 0 18 @@ -46,13 +46,13 @@ version; #X obj 4 597 pddp/pddplink all_about_help_patches.pd -text Usage Guide ; #X obj 503 7 pdinfo; -#X obj 39 284 pdinfo; +#X obj 39 299 pdinfo; #X msg 39 60 print; -#X msg 89 201 version; -#X obj 39 315 print pd-version; -#X text 143 200 version of Pd that's running (MAJOR MINOR TEST); -#X msg 83 178 samplerate; -#X text 157 177 global samplerate; +#X msg 89 216 version; +#X obj 39 330 print pd-version; +#X text 143 215 version of Pd that's running (MAJOR MINOR TEST); +#X msg 83 193 samplerate; +#X text 157 192 global samplerate; #X msg 70 116 dir; #X text 99 115 directory of the Pd executable; #X msg 64 86 blocksize; @@ -103,7 +103,7 @@ version; #X connect 23 0 21 0; #X connect 24 0 2 0; #X connect 28 0 2 0; -#X restore 156 340 pd audio-attributes; +#X restore 156 341 pd audio-attributes; #N canvas 125 83 428 395 midi-attributes 0; #X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0 14 -204280 -1 0; @@ -135,7 +135,7 @@ version; #X connect 15 0 2 0; #X connect 16 0 2 0; #X connect 17 0 2 0; -#X restore 296 340 pd midi-attributes; +#X restore 296 341 pd midi-attributes; #X text 98 370 print; #X text 168 370 - print out each available message (other than "print") followed by a semicolon and the output for that method.; @@ -145,21 +145,22 @@ followed by a semicolon and the output for that method.; audio-device and midi-device message in subpatches.; #X text 169 459 - output varies depending on the message sent to [pdinfo] ; -#X msg 101 253 classlist; -#X text 155 305 Audio and MIDI specific messages are in the subpatches -below:; +#X msg 101 268 classlist; #X text 81 547 When using the "classlist" message \, note that some external Pd classes don't have a name. These are currently listed simply as "anonymous-class" in the output.; -#X text 175 252 (long) list of all class names that have been loaded +#X text 175 267 (long) list of all class names that have been loaded in the running instance of Pd. (Note: not all classes can be created in an object box.); -#X msg 92 227 canvaslist; -#X text 166 226 list of pointers to toplevel canvases in running Pd +#X msg 92 242 canvaslist; +#X text 166 241 list of pointers to toplevel canvases in running Pd instance; #X text 80 59 print all attributes directly to the console; #X text 11 20 get info from the Pd instance that is running your patch ; +#X text 155 320 Audio and MIDI specific messages:; +#X msg 83 169 libdir; +#X text 132 168 directory where extra/ and doc/ are found; #X connect 12 0 15 0; #X connect 13 0 12 0; #X connect 14 0 12 0; @@ -168,4 +169,5 @@ instance; #X connect 21 0 12 0; #X connect 23 0 12 0; #X connect 33 0 12 0; -#X connect 37 0 12 0; +#X connect 36 0 12 0; +#X connect 41 0 12 0; diff --git a/pd/src/x_interface.c b/pd/src/x_interface.c index 10d414dbb..d3ba2a6df 100644 --- a/pd/src/x_interface.c +++ b/pd/src/x_interface.c @@ -833,18 +833,13 @@ void pdinfo_gui(t_pdinfo *x, t_symbol *s, int argc, t_atom *argv) info_out((t_text *)x, s, 1, at); } -/* note: this might be wrong. Not sure whether "libdir" means - something like /usr/lib/pd or the path where all the libdir externals - live-- i.e., /usr/lib/pd/extra */ +/* directory where extra and doc are found. Might also want to add + another method to return a list of all paths searched for libs-- i.e., + "extrapath". */ void pdinfo_libdir(t_pdinfo *x, t_symbol *s, int argc, t_atom *argv) { t_atom at[1]; - t_symbol *nsym; - t_namelist *nl = pd_extrapath; - while (nl->nl_next) - nl = nl->nl_next; - nsym = gensym(nl->nl_string); - SETSYMBOL(at, nsym); + SETSYMBOL(at, sys_libdir); info_out((t_text *)x, s, 1, at); } -- GitLab