edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Paul Onyschuk <ptmelville@gmail.com>
To: Edbrowse-dev@lists.the-brannons.com
Subject: [Edbrowse-dev] Using C99?
Date: Wed, 6 Aug 2014 20:05:39 +0200	[thread overview]
Message-ID: <20140806200539.4a2628fe870f9209014866c5@gmail.com> (raw)

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

             reply	other threads:[~2014-08-06 18:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 18:05 Paul Onyschuk [this message]
2014-08-06 20:45 Karl Dahlke
2014-08-07 10:30 ` Adam Thompson
2014-08-07 10:49   ` Paul Onyschuk
2014-08-07 15:37     ` Adam Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140806200539.4a2628fe870f9209014866c5@gmail.com \
    --to=ptmelville@gmail.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).