Re: vax/ddb(4): clean up machine dependent code and improve usability

Hans Rosenfeld <[email protected]>
Newsgroups gmane.os.netbsd.ports.vax
Message-ID <[email protected]>
On Tue, Mar 11, 2025 at 06:08:07PM +0100, Rhialto wrote:
> On Mon 10 Mar 2025 at 13:08:09 +0100, Hans Rosenfeld wrote:
> > Since this is a rather large change, I'd like to give anyone interested
> > a chance to do a proper code review before I commit this. I've been
> 
> It's not a change you made, but it occurs in the diff a lot:
> 
> In functions that take a printf-like function pointer pr:
> void (*pr)(const char *, ...), the function is called as
> 
> 	(*pr)("hallo");
> 
> [...]
> 
> 	pr("hallo");
> 
> And yes, this means you really can use "C++-like syntax" like
> ptr->member(arg1, arg2) if you have a struct with function pointers in
> it.

This is precisely what I do in my own code whenever I have to deal with
functions pointers. I just didn't want to change it everywhere, and
where I added a call to *pr I kept the original style for consistency.

I may change my mind on that before I commit it, though. :)


Hans


-- 
%SYSTEM-F-ANARCHISM, The operating system has been overthrown
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.