您的位置:首页 > 其它

May 7th Thursday (五月 七日 木曜日)

2009-05-29 10:43 323 查看
The program DATmnt is finished modifing. This day I am going to make unit testing for some import functions in them.
The PopDmdTbl() is so important, and FilterDmdTbl() is too. But I have no way to test them.

//getgrpinfo.c
#include <grp.h>
#include <sys/types.h>
#include <stdio.h>

main()
{
struct group *data;
FILE *stream;
int i;
stream = fopen("/etc/group", "r");
while ((data = fgetgrent(stream)) != 0)
{
i = 0;
printf("%s :%s:%d :", data->gr_name, data->gr_passwd, data->gr_gid);
while (data->gr_mem) printf("%s,", data->gr_mem[i++]);
printf("/n");
}
fclose(stream);
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: