📄 wraplib.c
字号:
/*
* Wrapper functions for our own library functions.
* Most are included in the source file for the function itself.
*/
#include "unp.h"
const char *
Inet_ntop(int family, const void *addrptr, char *strptr, size_t len)
{
const char *ptr;
if (strptr == NULL) /* check for old code */
err_quit("NULL 3rd argument to inet_ntop");
if ( (ptr = inet_ntop(family, addrptr, strptr, len)) == NULL)
err_sys("inet_ntop error"); /* sets errno */
return(ptr);
}
void
Inet_pton(int family, const char *strptr, void *addrptr)
{
int n;
if ( (n = inet_pton(family, strptr, addrptr)) < 0)
err_sys("inet_pton error for %s", strptr); /* errno set */
else if (n == 0)
err_quit("inet_pton error for %s", strptr); /* errno not set */
/* nothing to return */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -