refriend.c
上传用户:minyiyu
上传日期:2018-12-24
资源大小:864k
文件大小:2k
- #include "bbs.h"
- int
- report()
- {
- return;
- }
- int
- tranfer(uid)
- char *uid;
- {
- struct friend fh;
- char genbuf[80],*str;
- char fname[80];
- char dname[80];
- FILE *fp;
- memset(&fh,0,sizeof(struct friend));
- sprintf( fname, "/home/bbs/home/%s/overrides",uid);
- sprintf( dname, "/home/bbs/home/%s/friends",uid);
- if ((fp = fopen(fname, "r")) == NULL) {
- return 0;
- }
- while (fgets(genbuf, 80, fp) != NULL)
- {
- if ( (str=strtok( genbuf, " nrt") )!= NULL)
- {
- sprintf( fh.id,"%.12s", str );
- str= strtok( NULL, " nrt");
- sprintf( fh.exp,"%.14s", (str==NULL)?"