OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [newlib-1.10.0/] [newlib/] [libc/] [ctype/] [toascii.c] - Blame information for rev 1773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1005 ivang
/*
2
FUNCTION
3
        <<toascii>>---force integers to ASCII range
4
 
5
INDEX
6
        toascii
7
 
8
ANSI_SYNOPSIS
9
        #include <ctype.h>
10
        int toascii(int <[c]>);
11
 
12
TRAD_SYNOPSIS
13
        #include <ctype.h>
14
        int toascii(<[c]>);
15
        int (<[c]>);
16
 
17
DESCRIPTION
18
<<toascii>> is a macro which coerces integers to the ASCII range (0--127) by zeroing any higher-order bits.
19
 
20
You can use a compiled subroutine instead of the macro definition by
21
undefining this macro using `<<#undef toascii>>'.
22
 
23
RETURNS
24
<<toascii>> returns integers between 0 and 127.
25
 
26
PORTABILITY
27
<<toascii>> is not ANSI C.
28
 
29
No supporting OS subroutines are required.
30
*/
31
 
32
#include <_ansi.h>
33
#include <ctype.h>
34
#undef toascii
35
 
36
int
37
_DEFUN(toascii,(c),int c)
38
{
39
  return (c)&0177;
40
}
41
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.