[yoshimi] Re: V 1.5.7

  • From: blubee blubeeme <gurenchan@xxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Sat, 10 Mar 2018 20:06:19 +0800

On Sat, Mar 10, 2018 at 7:18 PM, Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
wrote:

On Sat, 10 Mar 2018 17:41:19 +0800
blubee blubeeme <gurenchan@xxxxxxxxx> wrote:

On Sat, Mar 10, 2018 at 5:03 PM, Will Godfrey <
willgodfrey@xxxxxxxxxxxxxxx>
wrote:

On Sat, 10 Mar 2018 16:57:04 +0800
blubee blubeeme <gurenchan@xxxxxxxxx> wrote:

On Sat, Mar 10, 2018 at 4:46 PM, blubee blubeeme <gurenchan@xxxxxxxxx>
wrote:



On Sat, Mar 10, 2018 at 4:40 PM, Will Godfrey <
willgodfrey@xxxxxxxxxxxxxxx
wrote:

On Sat, 10 Mar 2018 16:12:24 +0800
blubee blubeeme <gurenchan@xxxxxxxxx> wrote:

On Sat, Mar 10, 2018 at 4:08 PM, Will Godfrey <
willgodfrey@xxxxxxxxxxxxxxx>
wrote:

On Sat, 10 Mar 2018 07:55:07 +0100
Ichthyostega <prg@xxxxxxxxxxxxxxx> wrote:

In file included from
/usr/ports/audio/yoshimi/work/yoshimi-bbcb8a2/src/UI/Widget
PDial.h:34:
/usr/ports/audio/yoshimi/work/yoshimi-bbcb8a2/src/UI/
DynamicTooltip.h:52:8:
warning: 'DynTooltip::show' hides overloaded virtual function
[-Woverloaded-virtual]
 void show(float timeout=0);
      ^
/usr/local/include/FL/Fl_Menu_Window.H:35:8: note: hidden
overloaded
virtual
function 'Fl_Menu_Window::show' declared here: different
number of
parameters
(0 vs 1)
 void show();
      ^


IMHO this kind of warning should be taken seriously and
investigated.
This kind of errors can be quite insidious, because as a result
the
wrong overload of a method gets called, which typically does not
break
the program, but could cause subtly wrong behavior.

-- Hermann
I've renamed the local declaration to dynshow(float timeout)
This seems to resolve that particular problem.

--
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either:
https://sourceforge.net/
projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/
archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

I just realized why the copyfile.h error is happening.

You guys implemented the new feature and uses sys/sendfile on Linux
and
added the stub for FreeBSD based on copyfile.

I am not sure if we have that header but basically you're looking
to
copy
files.

Do you plan on using all the features defined in sys/sendfile; like
the
different copying methods or just COPYFILE_ALL.

If it's just copyfile_all, I can just write a simple copy file
function
and
call it a day. If you'll be using more advanced features I'll have
to
look
deeper to see what's available on *BSD.

Best,
Owen


Ha! Semms our posts overlapped.

We are selecting files to copy, not just doing a directory dump.
As the bank files are comparatively small and are all text ones,
pairing
up
those load and save text functions might be good enough. After all,
when
being
used, they are bulk loaded into memory.

Will

--
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either:
https://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx


I was looking at the MiscFuncs.cpp

Removing the copyfile.h from the __FreeBSD__ ifdef and I get
compilation
errors about the fcopy command around line 357.

I don't think that you'll need to write a whole new implementation.
There's actually quite a few copyfiles that I've seen so far.

There's this one on SO:https://stackoverflow.com/a/2180788
There's also a FreeBSD github repo with a copyfile implementation:
https://github.com/freebsd/freebsd/blob/master/bin/cp/utils.c#L78

if you're not doing a lot of copying one of these might be good
enough,
maybe?

Best,
Owen

Actually a little more digging; FreeBSD has sendfile:
https://www.freebsd.org/cgi/man.cgi?query=sendfile&sektion=2

Maybe we can avert all that re-implementing all together!

That's why I suggested commenting out those lines to see if it would
work
on
local files.

--
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either: https://sourceforge.net/
projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

I just did a quick test and it does compile after making a few edits.
Everything compiles.

There's a few differences between sendfile and FreeBSD implementation as
this one requires 7 arguments

Other than a few changes the program compiles to completion.

I've attached a small diff file to show the changes.


It seems we've been Ninja'd :o

I've been sent a patch that apparently sorts this, natively cross
platform. It
uses C++ sstream.

It's in the latest commit. Can you give it a try please.

--
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either: https://sourceforge.net/
projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

Hello

I can confirm that everything builds as expected.

Thanks for the fast turn around.

Best,
Owen

Other related posts: