#include "config.h"
#include "map.h"
#ifndef MSDOS
#include <stdio.h>
#endif
#include "socket.h"

void display_map (void);
void tdisplay_map (void);


static unsigned char map[] = {
	0			/* byte 0 */
#ifdef ISUNIX
		| ISUNIX_VAL
#endif

#ifdef SERVERS
		| SERVERS_VAL
#endif

#ifdef DSERVER
		| DSERVER_VAL
#endif

#ifdef TUTOR
		| TUTOR_VAL
#endif

#ifdef RDATE
		| RDATE_VAL
#endif

#ifdef XSERVER
		| XSERVER_VAL
#endif

#ifdef TERMSERVER
		| TERMSERVER_VAL
#endif

#ifdef ALLSERV
		| ALLSERV_VAL
#endif
	, 0			/* byte 1 */

#ifdef HTTP
		| HTTP_VAL
#endif

#ifdef HTTPPBBS
		| HTTPPBBS_VAL
#endif

#ifdef STRICT_HTTPCALL
		| STRICT_HTTPCALL_VAL
#endif

#ifdef CRONTAB
		| CRONTAB_VAL
#endif

#ifdef TCPGATE
		| TCPGATE_VAL
#endif

#ifdef SQL
		| SQL_VAL
#endif

#ifdef FIFOSERVER
		| FIFOSERVER_VAL
#endif

#ifdef TRACESERVER
		| TRACESERVER_VAL
#endif
	, 0			/* byte 2 */

#ifdef CONVERS
		| CONVERS_VAL
#endif

#ifdef NNTPS
		| NNTPS_VAL
#endif

#ifdef NNTP
		| NNTP_VAL
#endif

#ifdef GPS
		| GPS_VAL
#endif

#ifdef NNTPFILTER
		| NNTPFILTER_VAL
#endif

#ifdef RLOGINSERV
		| RLOGINSERV_VAL
#endif

#ifdef RLOGINCLI
		| RLOGINCLI_VAL
#endif

#ifdef TRACE
		| TRACE_VAL
#endif

	, 0			/* byte 3 */

#ifdef MAILBOX
		| MAILBOX_VAL
#endif

#ifdef FILECMDS
		| FILECMDS_VAL
#endif

#ifdef GATECMDS
		| GATECMDS_VAL
#endif

#ifdef PING_SECURE
		| PING_SECURE_VAL
#endif

#ifdef FOQ_CMDS
		| FOQ_CMDS_VAL
#endif

#ifdef MAILCMDS
		| MAILCMDS_VAL
#endif

#ifdef USERLOG
		| USERLOG_VAL
#endif

#ifdef MAILFOR
		| MAILFOR_VAL
#endif
	, 0 			/* byte 4 */

#ifdef DELEGATE
		| DELEGATE_VAL
#endif

#ifdef MBFWD
		| MBFWD_VAL
#endif

#ifdef ASKHOME
		| ASKHOME_VAL
#endif

#ifdef WPAGES
		| WPAGES_VAL
#endif

#ifdef RLINE
		| RLINE_VAL
#endif

#ifdef ALTERBID
		| ALTERBID_VAL
#endif

#ifdef MBXTDISC
		| MBXTDISC_VAL
#endif

#ifdef EXPIRY
		| EXPIRY_VAL
#endif
	, 0			/* byte 5 */

#ifdef FBBFWD
		| FBBFWD_VAL
#endif

#ifdef FBBCMP
		| FBBCMP_VAL
#endif

#ifdef XFWD
		| XFWD_VAL
#endif

#ifdef BBSIMPORT
		| BBSIMPORT_VAL
#endif

#ifdef BBSEXPORT
		| BBSEXPORT_VAL
#endif

#ifdef REJECT
		| REJECT_VAL
#endif

#ifdef LOG_GMT_TZ
		| LOG_GMT_TZ_VAL
#endif

#ifdef USE_TZOFFSET
		| USE_TZOFFSET_VAL
#endif
	, 0			/* byte 6 */

#ifdef PIPECMD
		| PIPECMD_VAL
#endif

#ifdef EDITHEADERS
		| EDITHEADERS_VAL
#endif

#ifdef TIPMAIL
		| TIPMAIL_VAL
#endif

#ifdef XMODEM
		| XMODEM_VAL
#endif

#ifdef PPP
		| PPP_VAL
#endif

#ifdef SLIP
		| SLIP_VAL
#endif

#ifdef VJCOMPRESS
		| VJCOMPRESS_VAL
#endif

#ifdef DIALER
		| DIALER_VAL
#endif
	, 0			/* byte 7 */

#ifdef POP
		| POP_VAL
#endif

#ifdef USEPOP3
		| USEPOP3_VAL
#endif

#ifdef POP3SERVER
		| POP3SERVER_VAL
#endif

#ifdef POP3CLIENT
		| POP3CLIENT_VAL
#endif

#ifdef POP2SERVER
		| POP2SERVER_VAL
#endif

#ifdef POP2CLIENT
		| POP2CLIENT_VAL
#endif

#ifdef IPACCESS
		| IPACCESS_VAL
#endif

#ifdef TCPACCESS
		| TCPACCESS_VAL
#endif
	, 0			/* byte 8 */

#ifdef RMAIL
		| RMAIL_VAL
#endif

#ifdef REQSVR
		| REQSVR_VAL
#endif

#ifdef TRANSLATE
		| TRANSLATE_VAL
#endif

#ifdef MAILFILTER
		| MAILFILTER_VAL
#endif

#ifdef HOLDMODS
		| HOLDMODS_VAL
#endif

#ifdef HOPPER
		| HOPPER_VAL
#endif

#ifdef HOLDMONITOR
		| HOLDMONITOR_VAL
#endif

#ifdef ALERTMONITOR
		| ALERTMONITOR_VAL
#endif
	, 0			/* byte 9 */

#ifdef RIP
		| RIP_VAL
#endif

#ifdef RSPF
		| RSPF_VAL
#endif

#ifdef RARP
		| RARP_VAL
#endif

#ifdef ENCAP
		| ENCAP_VAL
#endif

#ifdef AUTOROUTE
		| AUTOROUTE_VAL
#endif

#ifdef HOPCHECK
		| HOPCHECK_VAL
#endif

#ifdef LOOKSESSION
		| LOOKSESSION_VAL
#endif

#ifdef RXECHO
		| RXECHO_VAL
#endif
	, 0			/* byte 10 */

#ifdef APRSD
		| APRSD_VAL
#endif

#ifdef TTYCALL
		| TTYCALL_VAL
#endif

#ifdef AXBCSTR
		| AXBCSTR_VAL
#endif

#ifdef AXUI
		| AXUI_VAL
#endif

#ifdef NRS
		| NRS_VAL
#endif

#ifdef NETROM
		| NETROM_VAL
#endif

#ifdef NR4TDISC
		| NR4TDISC_VAL
#endif

#ifdef AXIP
		| AXIP_VAL
#endif
	, 0			/* byte 11 */

#ifdef STATS
		| STATS_VAL
#endif

#ifdef STATS_USE
		| STATS_USE_VAL
#endif

#ifdef STATS_MSG
		| STATS_MSG_VAL
#endif

#ifdef STATS_AREA
		| STATS_AREA_VAL
#endif

#ifdef STATS_FWD
		| STATS_FWD_VAL
#endif

#ifdef STATS_TFC
		| STATS_TFC_VAL
#endif

#ifdef BOOTPSERVER
		| BOOTPSERVER_VAL
#endif

#ifdef TSCRIPTSERVER
		| TSCRIPTSERVER_VAL
#endif
	, 0			/* byte 12 */

#ifdef CALLBOOK
		| CALLBOOK_VAL
#endif

#ifdef CALLCLI
		| CALLCLI_VAL
#endif

#ifdef QRZCALLB
		| QRZCALLB_VAL
#endif

#ifdef SAMCALLB
		| SAMCALLB_VAL
#endif

#ifdef CALLSERVER
		| CALLSERVER_VAL
#endif

#ifdef KISS
		| KISS_VAL
#endif

#ifdef POLLEDKISS
		| POLLEDKISS_VAL
#endif

#ifdef ASY
		| ASY_VAL
#endif
	, 0			/* byte 13 */

#ifdef BROWSER
		| BROWSER_VAL
#endif

#ifdef BOOTPCLIENT
		| BOOTPCLIENT_VAL
#endif

#ifdef MESSAGESERVER
		| MESSAGESERVER_VAL
#endif

#ifdef SCREENSAVER
		| SCREENSAVER_VAL
#endif

#ifdef ARCNET
		| ARCNET_VAL
#endif

#ifdef PC_EC
		| PC_EC_VAL
#endif

#ifdef HS
		| HS_VAL
#endif

#ifdef HAPN
		| HAPN_VAL
#endif
	, 0			/* byte 14 */

#ifdef EAGLE
		| EAGLE_VAL
#endif

#ifdef PACKET
		| PACKET_VAL
#endif

#ifdef PC100
		| PC100_VAL
#endif

#ifdef DRSI
		| DRSI_VAL
#endif

#ifdef SCC
		| SCC_VAL
#endif

#ifdef PI
		| PI_VAL
#endif

#ifdef SLFP
		| SLFP_VAL
#endif

#ifdef SM_DUMB
		| SM_DUMB_VAL
#endif
	, 0		/* byte 15 */

#ifdef SM_RAW
		| SM_RAW_VAL
#endif

#ifdef SM_CURSES
		| SM_CURSES_VAL
#endif

#ifdef UNIX_SOCKETS
		| UNIX_SOCKETS_VAL
#endif

#ifdef SOUNDS
		| SOUNDS_VAL
#endif

#ifdef SETPSINFO
		| SETPSINFO_VAL
#endif

#ifdef SCRIPTING
		| SCRIPTING_VAL
#endif

#ifdef CATALOG
		| CATALOG_VAL
#endif

#ifdef VERSION_ON_FILE
		| VERSION_ON_FILE_VAL
#endif
	, 0			/* byte 16 */

#ifdef LZW
		| LZW_VAL
#endif

#ifdef ATCMD
		| ATCMD_VAL
#endif

#ifdef LOCK
		| LOCK_VAL
#endif

#ifdef ESCAPE
		| ESCAPE_VAL
#endif

#ifdef SHELL
		| SHELL_VAL
#endif

#ifdef DOS_GETFILEATTR
		| DOS_GETFILEATTR_VAL
#endif

#ifdef STRICT_CALL
		| STRICT_CALL_VAL
#endif

#ifdef POOLED
		| POOLED_VAL
#endif
	, 0			/* byte 17 */

#ifdef ALLSESSIONS
		| ALLSESSIONS_VAL
#endif

#ifdef FTPTDISC
		| FTPTDISC_VAL
#endif

#ifdef ALLCMD
		| ALLCMD_VAL
#endif

#ifdef MONITOR
		| MONITOR_VAL
#endif
	
#ifdef FORTH
		| FORTH_VAL
#endif

#ifdef NODECALL
		| NODECALL_VAL
#endif

#ifdef STATS_HTTP
		| STATS_HTTP_VAL
#endif

#ifdef UDPACCESS
		| UDPACCESS_VAL
#endif

	, 0			/* byte 18 */

#ifdef ROUTESERVER
		| ROUTESERVER_VAL
#endif

#ifdef STRICT_AX25CALL
		| STRICT_AX25CALL_VAL
#endif

#ifdef UKIP
		| UKIP_VAL
#endif

#ifdef PATCURSES
		| PATCURSES_VAL
#endif

#ifdef AXUDP
		| AXUDP_VAL
#endif

#ifdef APRSD
		| APRSD_VAL
#endif
};


void
display_map (void)
{
int k;
	printf ("Features map: ");
	for (k = 0; k < MAPLENGTH; k++)
		printf ("%02x", map[k]);
	(void) putchar ('\n');		/*lint !e415 */
}


void
tdisplay_map (void)
{
int k;
	tprintf ("\nFeatures map: ");
	for (k = 0; k < MAPLENGTH; k++)
		tprintf ("%02x", map[k]);
	(void) tputs ("\n\n");		/*lint !e415 */
}

