| 1 |
/*************************************************************************** |
/*************************************************************************** |
| 2 |
common.h - description |
common.h - description |
| 3 |
------------------- |
------------------- |
| 4 |
begin : Mon Oct 18 2004 |
begin : Mon Oct 18 2004 |
| 5 |
copyright : (C) 2004 by Leaflet |
copyright : (C) 2004 by Leaflet |
| 6 |
email : leaflet@leafok.com |
email : leaflet@leafok.com |
| 7 |
***************************************************************************/ |
***************************************************************************/ |
| 8 |
|
|
| 9 |
/*************************************************************************** |
/*************************************************************************** |
| 15 |
* * |
* * |
| 16 |
***************************************************************************/ |
***************************************************************************/ |
| 17 |
|
|
| 18 |
#include <stdio.h> |
#ifndef _COMMON_H_ |
| 19 |
#include <time.h> |
#define _COMMON_H_ |
|
#include <ctype.h> |
|
|
#include <unistd.h> |
|
|
#include <signal.h> |
|
|
#include <sys/param.h> |
|
|
#include <sys/types.h> |
|
|
#include <sys/stat.h> |
|
|
#include <sys/socket.h> |
|
|
#include <netinet/in.h> |
|
|
#include <netdb.h> |
|
|
#include <mysql.h> |
|
| 20 |
|
|
| 21 |
//Version |
#include <stddef.h> |
| 22 |
|
|
| 23 |
|
// Version |
| 24 |
extern char app_version[256]; |
extern char app_version[256]; |
| 25 |
|
|
| 26 |
//Enviroment |
// Enviroment |
| 27 |
extern char app_home_dir[256]; |
extern char app_home_dir[256]; |
| 28 |
|
extern char app_temp_dir[256]; |
| 29 |
|
|
| 30 |
//Network |
// Network |
| 31 |
extern int socket_server; |
extern int socket_server; |
| 32 |
extern int socket_client; |
extern int socket_client; |
| 33 |
extern char hostaddr_server[50]; |
extern char hostaddr_server[50]; |
| 35 |
extern int port_server; |
extern int port_server; |
| 36 |
extern int port_client; |
extern int port_client; |
| 37 |
|
|
| 38 |
//Database |
// Database |
| 39 |
extern char DB_host[256]; |
extern char DB_host[256]; |
| 40 |
extern char DB_username[50]; |
extern char DB_username[50]; |
| 41 |
extern char DB_password[50]; |
extern char DB_password[50]; |
| 42 |
extern char DB_database[50]; |
extern char DB_database[50]; |
| 43 |
|
extern char DB_timezone[50]; |
| 44 |
|
|
| 45 |
|
// Signal |
| 46 |
|
#define SIG_RELOAD_MENU 0x22 |
| 47 |
|
|
| 48 |
|
extern const char *str_space(char *string, int length); |
| 49 |
|
extern const char *get_time_str(char *string, size_t length); |
| 50 |
|
|
| 51 |
|
// Signal handler |
| 52 |
|
extern void reload_bbs_menu(int); |
| 53 |
|
extern void system_exit(int); |
| 54 |
|
extern void child_exit(int); |
| 55 |
|
|
| 56 |
|
// System |
| 57 |
|
extern int SYS_exit; |
| 58 |
|
extern int SYS_child_process_count; |
| 59 |
|
|
| 60 |
|
#endif //_COMMON_H_ |