toascii.c

来自「KPIT GNU Tools is a set of GNU developme」· C语言 代码 · 共 42 行

C
42
字号
/*FUNCTION	<<toascii>>---force integers to ASCII rangeINDEX	toasciiANSI_SYNOPSIS	#include <ctype.h>	int toascii(int <[c]>);TRAD_SYNOPSIS	#include <ctype.h>	int toascii(<[c]>);	int (<[c]>);DESCRIPTION<<toascii>> is a macro which coerces integers to the ASCII range (0--127) by zeroing any higher-order bits.You can use a compiled subroutine instead of the macro definition byundefining this macro using `<<#undef toascii>>'.RETURNS<<toascii>> returns integers between 0 and 127.PORTABILITY<<toascii>> is not ANSI C.No supporting OS subroutines are required.*/#include <_ansi.h>#include <ctype.h>#undef toasciiint_DEFUN(toascii,(c),int c){  return (c)&0177;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?