| <html lang="en"> |
| <head> |
| <title>toascii - Untitled</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="Untitled"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="Ctype.html#Ctype" title="Ctype"> |
| <link rel="prev" href="isxdigit.html#isxdigit" title="isxdigit"> |
| <link rel="next" href="tolower.html#tolower" title="tolower"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="toascii"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="tolower.html#tolower">tolower</a>, |
| Previous: <a rel="previous" accesskey="p" href="isxdigit.html#isxdigit">isxdigit</a>, |
| Up: <a rel="up" accesskey="u" href="Ctype.html#Ctype">Ctype</a> |
| <hr> |
| </div> |
| |
| <h3 class="section">3.12 <code>toascii</code>—force integers to ASCII range</h3> |
| |
| <p><a name="index-toascii-122"></a><strong>Synopsis</strong> |
| <pre class="example"> #include <ctype.h> |
| int toascii(int <var>c</var>); |
| |
| </pre> |
| <p><strong>Description</strong><br> |
| <code>toascii</code> is a macro which coerces integers to the ASCII range (0–127) by zeroing any higher-order bits. |
| |
| <p>You can use a compiled subroutine instead of the macro definition by |
| undefining this macro using `<code>#undef toascii</code>'. |
| |
| <p><br> |
| <strong>Returns</strong><br> |
| <code>toascii</code> returns integers between 0 and 127. |
| |
| <p><br> |
| <strong>Portability</strong><br> |
| <code>toascii</code> is not ANSI C. |
| |
| <p>No supporting OS subroutines are required. |
| |
| <p><br> |
| |
| </body></html> |
| |