Thursday, August 20, 2009

標準Cライブラリの実装 strerror関数

see also: http://www.kijineko.com/doc/jsp/strerror_8c-source.html
標準Cライブラリの実装 strerror関数: "#include

char *strerror(int errnum)
{
char *result;
switch (errnum)
{
case 0:
result = 'No error';
break;
case EDOM:
result = 'Domain error';
break;
case ERANGE:
result = 'Range error';
break;
case EILSEQ:
result = 'Illegal sequence';
break;
default:
result = 'Unknown error';
break;
}
return result;
}"

No comments: