/* HexChat * Copyright (C) 1998-2010 Peter Zelezny. * Copyright (C) 2009-2013 Berke Viktor. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ #include "config.h" #include #include #include #include /* need time_t */ #ifndef HEXCHAT_H #define HEXCHAT_H #ifdef USE_OPENSSL #ifdef __APPLE__ #define __AVAILABILITYMACROS__ #define DEPRECATED_IN_MAC_OS_X_VERSION_10_7_AND_LATER #endif #endif #include "history.h" #ifndef HAVE_SNPRINTF #define snprintf g_snprintf #endif #ifndef HAVE_VSNPRINTF #define vsnprintf _vsnprintf #endif #ifdef SOCKS #ifdef __sgi #include #define INCLUDE_PROTOTYPES 1 #endif #include #endif #ifdef USE_OPENSSL #include /* SSL_() */ #endif #ifdef __EMX__ /* for o/s 2 */ #define OFLAGS O_BINARY #define g_ascii_strcasecmp stricmp #define g_ascii_strncasecmp strnicmp #define PATH_MAX MAXPATHLEN #define FILEPATH_LEN_MAX MAXPATHLEN #endif /* force a 32bit CMP.L */ #define WORDL(c0, c1, c2, c3) (guint32)(c0 | (c1 << 8) | (c2 << 16) | (c3 << 24)) #ifdef WIN32 /* for win32 */ #define OFLAGS O_BINARY #define sleep(t) Sleep(t*1000) #include #define F_OK 0 #define X_OK 1 #define W_OK 2 #define R_OK 4 #ifndef S_ISDIR #define S_ISDIR(m) ((m) & _S_IFDIR) #endif #define NETWORK_PRIVATE #else /* for unix */ #define OFLAGS 0 #endif #define FONTNAMELEN 127 #define PATHLEN 255 #define DOMAINLEN 100 #define NICKLEN 64 /* including the NULL, so 63 really */ #define CHANLEN 300 #define PDIWORDS 32 #define USERNAMELEN 10 #define HIDDEN_CHAR 8 /* invisible character for xtext */ struct nbexec { int myfd; int childpid; int tochannel; /* making this int keeps the struct 4-byte aligned */ int iotag; char *linebuf; int buffill; struct session *sess; }; struct hexchatprefs { /* these are the rebranded, consistent, sorted hexchat variables */ /* BOOLEANS */ unsigned int hex_away_auto_unmark; unsigned int hex_away_omit_alerts; unsigned int hex_away_show_once; unsigned int hex_away_track; unsigned int hex_completion_auto; unsigned int hex_dcc_auto_chat; unsigned int hex_dcc_auto_resume; unsigned int hex_dcc_fast_send; unsigned int hex_dcc_ip_from_server; unsigned int hex_dcc_remove; unsigned int hex_dcc_save_nick; unsigned int hex_dcc_send_fillspaces; unsigned int hex_gui_autoopen_chat; unsigned int hex_gui_autoopen_dialog; unsigned int hex_gui_autoopen_recv; unsigned int hex_gui_autoopen_send; unsigned int hex_gui_compact; unsigned int hex_gui_filesize_iec; unsigned int hex_gui_focus_omitalerts; unsigned int hex_gui_hide_menu; unsigned int hex_gui_input_attr; unsigned int hex_gui_input_icon; unsigned int hex_gui_input_nick; unsigned int hex_gui_input_spell; unsigned int hex_gui_input_style; unsigned int hex_gui_join_dialog; unsigned int hex_gui_mode_buttons; unsigned int hex_gui_quit_dialog; /* unsigned int hex_gui_single; */ unsigned int hex_gui_slist_fav; unsigned int hex_gui_slist_skip; unsigned int hex_gui_tab_chans; unsigned int hex_gui_tab_dialogs; unsigned int hex_gui_tab_dots; unsigned int hex_gui_tab_icons; unsigned int hex_gui_tab_scrollchans; unsigned int hex_gui_tab_server; unsigned int hex_gui_tab_sort; unsigned int hex_gui_tab_utils; unsigned int hex_gui_topicbar; unsigned int hex_gui_tray; unsigned int hex_gui_tray_away; unsigned int hex_gui_tray_blink; unsigned int hex_gui_tray_close; unsigned int hex_gui_tray_minimize; unsigned int hex_gui_tray_quiet; unsigned int hex_gui_ulist_buttons; unsigned int hex_gui_ulist_color; unsigned int hex_gui_ulist_count; unsigned int hex_gui_ulist_hide; unsigned int hex_gui_ulist_icons; unsigned int hex_gui_ulist_resizable; unsigned int hex_gui_ulist_show_hosts; unsigned int hex_gui_ulist_style; unsigned int hex_gui_usermenu; unsigned int hex_gui_win_modes; unsigned int hex_gui_win_save; unsigned int hex_gui_win_swap; unsigned int hex_gui_win_ucount; unsigned int hex_identd; unsigned int hex_input_balloon_chans; unsigned int hex_input_balloon_hilight; unsigned int hex_input_balloon_priv; unsigned int hex_input_beep_chans; unsigned int hex_input_beep_hilight; unsigned int hex_input_beep_priv; unsigned int hex_input_filter_beep; unsigned int hex_input_flash_chans; unsigned int hex_input_flash_hilight; unsigned int hex_input_flash_priv; unsigned int hex_input_perc_ascii; unsigned int hex_input_perc_color; unsigned int hex_input_tray_chans; unsigned int hex_input_tray_hilight; unsigned int hex_input_tray_priv; unsigned int hex_irc_auto_rejoin; unsigned int hex_irc_conf_mode; unsigned int hex_irc_hidehost; unsigned int hex_irc_hide_nickchange; unsigned int hex_irc_hide_version; unsigned int hex_irc_invisible; unsigned int hex_irc_logging; unsigned int hex_irc_raw_modes; unsigned int hex_irc_servernotice; unsigned int hex_irc_skip_motd; unsigned int hex_irc_wallops; unsigned int hex_irc_who_join; unsigned int hex_irc_whois_front; unsigned int hex_irc_cap_server_time; unsigned int hex_net_auto_reconnect; unsigned int hex_net_auto_reconnectonfail; unsigned int hex_net_proxy_auth; unsigned int hex_net_throttle; unsigned int hex_notify_whois_online; unsigned int hex_perl_warnings; unsigned int hex_stamp_log; unsigned int hex_stamp_text; unsigned int hex_text_autocopy_color; unsigned int hex_text_autocopy_stamp; unsigned int hex_text_autocopy_text; unsigned int hex_text_color_nicks; unsigned int hex_text_indent; unsigned int hex_text_replay; unsigned int hex_text_search_case_match; unsigned int hex_text_search_highlight_all; unsigned int hex_text_search_follow; unsigned int hex_text_search_regexp; unsigned int hex_text_show_marker; unsigned int hex_text_show_sep; unsigned int hex_text_stripcolor_msg; unsigned int hex_text_stripcolor_replay; unsigned int hex_text_stripcolor_topic; unsigned int hex_text_thin_sep; unsigned int hex_text_transparent; unsigned int hex_text_wordwrap; unsigned int hex_url_grabber; unsigned int hex_url_logging; /* NUMBERS */ int hex_away_size_max; int hex_away_timeout; int hex_completion_amount; int hex_completion_sort; int hex_dcc_auto_recv; int hex_dcc_blocksize; int hex_dcc_global_max_get_cps; int hex_dcc_global_max_send_cps; int hex_dcc_max_get_cps; int hex_dcc_max_send_cps; int hex_dcc_permissions; int hex_dcc_port_first; int hex_dcc_port_last; int hex_dcc_stall_timeout; int hex_dcc_timeout; int hex_flood_ctcp_num; /* flood */ int hex_flood_ctcp_time; /* seconds of floods */ int hex_flood_msg_num; /* same deal */ int hex_flood_msg_time; int hex_gui_chanlist_maxusers; int hex_gui_chanlist_minusers; int hex_gui_dialog_height; int hex_gui_dialog_left; int hex_gui_dialog_top; int hex_gui_dialog_width; int hex_gui_lagometer; int hex_gui_lang; int hex_gui_pane_divider_position; int hex_gui_pane_left_size; int hex_gui_pane_right_size; int hex_gui_pane_right_size_min; int hex_gui_search_pos; int hex_gui_slist_select; int hex_gui_tab_layout; int hex_gui_tab_newtofront; int hex_gui_tab_pos; int hex_gui_tab_small; int hex_gui_tab_trunc; int hex_gui_transparency; int hex_gui_throttlemeter; int hex_gui_ulist_pos; int hex_gui_ulist_sort; int hex_gui_url_mod; int hex_gui_win_height; int hex_gui_win_fullscreen; int hex_gui_win_left; int hex_gui_win_state; int hex_gui_win_top; int hex_gui_win_width; int hex_input_balloon_time; int hex_irc_ban_type; int hex_irc_join_delay; int hex_irc_notice_pos; int hex_net_ping_timeout; int hex_net_proxy_port; int hex_net_proxy_type; /* 0=disabled, 1=wingate 2=socks4, 3=socks5, 4=http */ int hex_net_proxy_use; /* 0=all 1=IRC_ONLY 2=DCC_ONLY */ int hex_net_reconnect_delay; int hex_notify_timeout; int hex_text_max_indent; int hex_text_max_lines; int hex_url_grabber_limit; /* STRINGS */ char hex_away_reason[256]; char hex_completion_suffix[4]; /* Only ever holds a one-character string. */ char hex_dcc_completed_dir[PATHLEN + 1]; char hex_dcc_dir[PATHLEN + 1]; char hex_dcc_ip[DOMAINLEN + 1]; char hex_gui_ulist_doubleclick[256]; char hex_input_command_char[4]; char hex_irc_extra_hilight[300]; char hex_irc_id_ntext[64]; char hex_irc_id_ytext[64]; char hex_irc_logmask[256]; char hex_irc_nick1[NICKLEN]; char hex_irc_nick2[NICKLEN]; char hex_irc_nick3[NICKLEN]; char hex_irc_nick_hilight[300]; char hex_irc_no_hilight[300]; char hex_irc_part_reason[256]; char hex_irc_quit_reason[256]; char hex_irc_real_name[127]; char hex_irc_user_name[127]; char hex_net_bind_host[127]; char hex_net_proxy_host[64]; char hex_net_proxy_pass[32]; char hex_net_proxy_user[32]; char hex_stamp_log_format[64]; char hex_stamp_text_format[64]; char hex_text_background[PATHLEN + 1]; char hex_text_font[4 * FONTNAMELEN + 1]; char hex_text_font_main[FONTNAMELEN + 1]; char hex_text_font_alternative[3 * FONTNAMELEN + 1]; char hex_text_spell_langs[64]; /* these are the private variables */ guint32 local_ip; guint32 dcc_ip; unsigned int wait_on_exit; /* wait for logs to be flushed to disk IF we're connected */ unsigned int utf8_locale; /* Tells us if we need to save, only when they've been edited. This is so that we continue using internal defaults (which can change in the next release) until the user edits them. */ unsigned int save_pevents:1; }; /* Session types */ #define SESS_SERVER 1 #define SESS_CHANNEL 2 #define SESS_DIALOG 3 #define SESS_NOTICES 4 #define SESS_SNOTICES 5 /* Per-Channel Settings */ #define SET_OFF 0 #define SET_ON 1 #define SET_DEFAULT 2 /* use global setting */ /* Priorities in the "interesting sessions" priority queue * (see xchat.c:sess_list_by_lastact) */ #define LACT_NONE -1 /* no queues */ #define LACT_QUERY_HI 0 /* query with hilight */ #define LACT_QUERY 1 /* query with messages */ #define LACT_CHAN_HI 2 /* channel with hilight */ #define LACT_CHAN 3 /* channel wi
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup Label="ProjectConfigurations">
    <ProjectConfiguration Include="Debug|Win32">
      <Configuration>Debug</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Debug|x64">
      <Configuration>Debug</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|Win32">
      <Configuration>Release</Configuration>
      <Platform>Win32</Platform>
    </ProjectConfiguration>
    <ProjectConfiguration Include="Release|x64">
      <Configuration>Release</Configuration>
      <Platform>x64</Platform>
    </ProjectConfiguration>
  </ItemGroup>
  <PropertyGroup Label="Globals">
    <ProjectGuid>{D61C0DCA-5B99-466D-B218-84B4AAD8095E}</ProjectGuid>
    <RootNamespace>fc-cache</RootNamespace>
    <Keyword>Win32Proj</Keyword>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
    <ConfigurationType>Application</ConfigurationType>
    <CharacterSet>MultiByte</CharacterSet>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings">
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="fontconfig.props" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="fontconfig.props" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="fontconfig.props" />
  </ImportGroup>
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="fontconfig.props" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <PropertyGroup>
    <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>