/[LeafOK_CVS]/lbbs/src/bbs_main.c
ViewVC logotype

Diff of /lbbs/src/bbs_main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 by sysadm, Tue Oct 19 02:08:35 2004 UTC Revision 1.8 by sysadm, Fri Oct 22 18:47:51 2004 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2                            bbsd.c  -  description                            bbs_main.c  -  description
3                               -------------------                               -------------------
4      begin                : Mon Oct 18 2004      begin                : Mon Oct 18 2004
5      copyright            : (C) 2004 by Leaflet      copyright            : (C) 2004 by Leaflet
# Line 15  Line 15 
15   *                                                                         *   *                                                                         *
16   ***************************************************************************/   ***************************************************************************/
17    
18    #include "bbs.h"
19  #include "common.h"  #include "common.h"
20    #include "io.h"
21    
22  int  int
23  bbs_main()  bbs_main()
24  {  {
25          log_std("bbs_main()\n");    char temp[256];
26              int ret;
27          return 0;    
28      //Welcome
29      bbs_info();
30      bbs_welcome();
31    
32      //Login
33      ret = bbs_login();
34      if (ret < 0)
35        return -1;
36      
37      //Show information
38      strcpy (temp, app_home_dir);
39      strcat (temp, "data/bbs_top.txt");
40      clearscr();
41      display_file(temp);
42      press_any_key();
43    
44      //Main
45      bbs_center();
46    
47      //Logout
48      bbs_exit();
49    
50      return 0;
51    }
52    
53    int
54    bbs_info()
55    {
56      prints(
57        "\033[1;37m»¶Ó­¹âÁÙ \033[33m%s \033[32m[%s]  \033[37m( %s )\r\n",
58        BBS_name, BBS_server, app_version);
59        
60      iflush();
61    
62      return 0;
63    }
64    
65    int
66    bbs_exit()
67    {
68      prints("\033[0;37m\r\n");
69      iflush();
70    
71      sleep(1);
72      
73      return 0;
74    }
75    
76    int
77    bbs_center()
78    {
79      show_top();
80    
81      show_bottom();
82    
83      return 0;
84  }  }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1