renotepad.c
上传用户:minyiyu
上传日期:2018-12-24
资源大小:864k
文件大小:1k
源码类别:

Telnet服务器

开发平台:

Unix_Linux

  1. #include "../../include/bbs.h"
  2. #include "../../include/permissions.h"
  3. int
  4. report()
  5. {
  6.         return;
  7. }
  8. main()
  9. {
  10.         FILE *rec;
  11.         int i=0;
  12.         struct userec user;
  13.         rec=fopen("/home/bbs/.PASSWDS","rb");
  14.         printf("UserLevel Records Transfering...n");
  15.         while(1)
  16.         {
  17.                 if(fread(&user,sizeof(user),1,rec)<=0) break;
  18.                 i++;
  19.                 printf("%d %stn",i,user.userid);
  20.                 if(user.notemode!=3)
  21.                         user.userdefine|=DEF_NOTEPAD;
  22.                 else
  23.                         user.userdefine&=~DEF_NOTEPAD;
  24.                 substitute_record("/home/bbs/.PASSWDS",&user,
  25.                                          sizeof(user),i);
  26.         }
  27.         printf("n%d UserLevel Records Tranfered...n",i);
  28.         fclose(rec);
  29. }