nanogui: Nano-X and Ansi-C compliance.


Previous by date: 29 Mar 2001 10:18:02 -0000 Re: problem when starting "nano-X &"?, Morten Rolland
Next by date: 29 Mar 2001 10:18:02 -0000 docs in detail on using Tinywidget, Zhang Hong-W17904
Previous in thread:
Next in thread: 29 Mar 2001 10:18:02 -0000 Re: Nano-X and Ansi-C compliance., Jordan Crouse

Subject: Nano-X and Ansi-C compliance.
From: Simon Wood ####@####.####
Date: 29 Mar 2001 10:18:02 -0000
Message-Id: <44632C76B97BD211AF6B00805FADCAB208790594@exchange.saltaire.pace.co.uk>

Hello all,
I'm currently running Microwindows through a 'new' compiler and I'm coming up with a few quirks.

Firstly there are (quite) a few c++ comments - Please don't do this, it's not big or cleaver, and is making me cry....

More important there are a number of non-ansi compliant function calls and includes, and I'm not sure on the most portable way to deal with these. My feeling is that we should aim to have the code 100% ansi-c compliant, so that someone could pick up compiler xzy (which is Ansi-C) and build straight off.

But how can we achieve this?

I thought that providing a conversion library (possibly included in libmwin) where ansi-c functions can be remapped to local functions, or coded up would be the  way to go, but I can't see how this would help with the standard include calls, for things such as include<time.h>.

Would the following be OK in the code?
#ifdef ANSI_C
	#include <time.h>
#else
	#if (UNIX | DJGPP)
		#include <sys/time.h>
	#endif
	#include "ansiconv.h"	/* include platform specific conversions */
#endif

Let me know what you guys think. I don't particularly want to waste a lot of time coding if it's no use to others.

Simon Wood


Previous by date: 29 Mar 2001 10:18:02 -0000 Re: problem when starting "nano-X &"?, Morten Rolland
Next by date: 29 Mar 2001 10:18:02 -0000 docs in detail on using Tinywidget, Zhang Hong-W17904
Previous in thread:
Next in thread: 29 Mar 2001 10:18:02 -0000 Re: Nano-X and Ansi-C compliance., Jordan Crouse


Powered by ezmlm-browse 0.20.