edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev]  Using C99?
@ 2014-08-06 20:45 Karl Dahlke
  2014-08-07 10:30 ` Adam Thompson
  0 siblings, 1 reply; 5+ messages in thread
From: Karl Dahlke @ 2014-08-06 20:45 UTC (permalink / raw)
  To: Edbrowse-dev

I would very much like to port edbrowse to windows someday,
and so would like the option of compiling under visual studio.

Yes the bool type would be especially nice since we do use it for the cpp files,
and using eb_bool for the c files is a bit of a workaround that I don't especially like.
Some of your other changes would be nice as well.
Maybe you can do a little research and see which ones
we can make while preserving a reasonable amount of portability,
including, someday, the option of a windows port.

Someone once ported this to mac, thus the makefile.osx,
but that was a long time ago and nobody has kept up with it.
makefile.osx is I'm sure out of date by now.

Karl Dahlke

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [Edbrowse-dev] Using C99?
@ 2014-08-06 18:05 Paul Onyschuk
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Onyschuk @ 2014-08-06 18:05 UTC (permalink / raw)
  To: Edbrowse-dev

Is edbrowse targeting C89 or there is a reason why some of the newer
features aren't used?  That could be the case very well, if a
compilation under Visual Studio is supported, since Microsoft decided
not to update C beyond C89.

I'm asking, because there are places, where code could be improved a
little bit.  Some examples:

- designated initializer for arrays in message.c
- bool type from <stdbool.h> instead of eb_bool (this is cosmetic)
- snprintf() for string manipulation with bound checking, could be
  used to replace strcpy()/strcat() where performance isn't important
- strdup() instead of cloneString(), asprintf() instead of
  appendString () and prependString(). Those aren't standard functions,
  but enviroment with C99 compiler should provide them.

But then according to readme, edbrowse is moving toward C++, so maybe
it isn't worth the hustle.

-- 
Paul Onyschuk

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-07 15:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06 20:45 [Edbrowse-dev] Using C99? Karl Dahlke
2014-08-07 10:30 ` Adam Thompson
2014-08-07 10:49   ` Paul Onyschuk
2014-08-07 15:37     ` Adam Thompson
  -- strict thread matches above, loose matches on Subject: below --
2014-08-06 18:05 Paul Onyschuk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).