Chris Allegretta | 13 Jan 2009 20:27

Re: nano fails to build cleanly with -pedantic

I have been thinking about this on and off and have been browsing the web for a good answer to this issue.  I emailed Aitan (forgetting to CC the list) to ask if anyone knew the way to pass around the address of a function in ISO C in order to execute different functions with a pointer, but I haven't been able to find anything which answers the question except for that apparently passing around function addresses is some sort of crime in ISO C, which considering what insane things C lets you do strikes me as strange place to draw the line.

Anyway, if anyone knows how this can be done given what we are trying to do in nano with key bindings, please let me know.  Otherwise I can put on my list to create a series of compiler macros for each function to be bound (and change scfunc in struct sc to a short) and pass those around instead , but that will be a lower priority in the short term compared to getting the editor actually stable.

On Sun, Dec 28, 2008 at 9:57 PM, Eitan Adler <eitanadlerlist <at> gmail.com> wrote:
Hey I just wanted to point out that nano from revision 4347 (and
probably earlier) don't build cleanly with -pedantic. Is ISO compliance
a goal of this project?


--
Eitan Adler
"Security is increased by designing for the way humans actually behave."
-Jakob Nielsen


_______________________________________________
Nano-devel mailing list
Nano-devel <at> gnu.org
http://lists.gnu.org/mailman/listinfo/nano-devel

_______________________________________________
Nano-devel mailing list
Nano-devel <at> gnu.org
http://lists.gnu.org/mailman/listinfo/nano-devel
Chris Allegretta | 19 Jan 2009 20:12

Re: nano fails to build cleanly with -pedantic

Ahh, where would we be without Obsessive Compulsive Disorder.  I rewrote the function mapping to use shorts, so -pedantic should be happy.   Hopefully no bugs were introduced but time will tell.  Committed and credited in r4349. 

On Tue, Jan 13, 2009 at 2:27 PM, Chris Allegretta <chrisa <at> asty.org> wrote:
I have been thinking about this on and off and have been browsing the web for a good answer to this issue.  I emailed Aitan (forgetting to CC the list) to ask if anyone knew the way to pass around the address of a function in ISO C in order to execute different functions with a pointer, but I haven't been able to find anything which answers the question except for that apparently passing around function addresses is some sort of crime in ISO C, which considering what insane things C lets you do strikes me as strange place to draw the line.

Anyway, if anyone knows how this can be done given what we are trying to do in nano with key bindings, please let me know.  Otherwise I can put on my list to create a series of compiler macros for each function to be bound (and change scfunc in struct sc to a short) and pass those around instead , but that will be a lower priority in the short term compared to getting the editor actually stable.

On Sun, Dec 28, 2008 at 9:57 PM, Eitan Adler <eitanadlerlist <at> gmail.com> wrote:
Hey I just wanted to point out that nano from revision 4347 (and
probably earlier) don't build cleanly with -pedantic. Is ISO compliance
a goal of this project?


--
Eitan Adler
"Security is increased by designing for the way humans actually behave."
-Jakob Nielsen


_______________________________________________
Nano-devel mailing list
Nano-devel <at> gnu.org
http://lists.gnu.org/mailman/listinfo/nano-devel


_______________________________________________
Nano-devel mailing list
Nano-devel <at> gnu.org
http://lists.gnu.org/mailman/listinfo/nano-devel

Gmane