This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Patch to document ISALPHA etc. convention

Recent discussion e.g. 
<> illustrated that the 
use of ISALPHA etc. in place of isalpha etc. isn't documented.  This patch 
adds an explanation in codingconventions.html.  OK to commit?

Joseph S. Myers      (personal mail) (CodeSourcery mail) (Bugzilla assignments and CCs)

Index: codingconventions.html
RCS file: /cvs/gcc/wwwdocs/htdocs/codingconventions.html,v
retrieving revision 1.39
diff -u -r1.39 codingconventions.html
--- codingconventions.html	24 Nov 2004 07:34:52 -0000	1.39
+++ codingconventions.html	25 Jan 2005 22:59:06 -0000
@@ -156,6 +156,12 @@
 compiler can reasonably carry on after the error, they may be
 conditioned on <code>--enable-checking</code>.</p>
+<p>Code testing properties of characters from user source code should
+use macros such as <code>ISALPHA</code> from <code>safe-ctype.h</code>
+instead of the standard functions such as <code>isalpha</code> from
+<code>&lt;ctype.h&gt;</code> to avoid any locale-dependency of the
+language accepted.</p>
 <p>Code in GCC should use the following formatting conventions:</p>
 <table cellpadding="4">

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]